Posts

Asset price Prediction Using Principal Component Analysis And Machine Learning Regression Model

Image
In this post, we are trying to predict tomorrow’s price of a financial asset using a machine learning method and show how we can improve the prediction result by using a feature extraction technique such as principal component analysis (PCA). What is feature extraction? feature extraction is the process of selecting the most relevant and informative features from a dataset to improve the performance of machine learning models used for financial analysis. Feature extraction helps in reducing the number of features in the model and creating new features from the existing attributes. The feature selection process delivers unique features that contribute the most to the prediction outcomes by removing noise and irrelevant features. In finance, several types of feature extraction techniques are used to identify the most relevant features from a dataset. Some of the most commonly used feature extraction techniques include: -              Principal Component Analysis (PCA):  A statist

How to check if a distribution is normal?

Image
    Many models assumed that the distribution is normal. It is a wise idea to check if your distribution is normal before use it in the model. In this post I want to explain you, some numerical and visual methods you can use to check if a distribution is normal. 1)     Boxplot-Whisker Plot and Histogram: Plotting Boxplot-whisker plot and the histogram of the distribution is a visual way you can use to see if the distribution looks normal. The Boxplot-whisker lets us check the symmetry around the mean and the histogram help us to visualize the overall shape of the distribution. Let’s see it in an example: In this example we create one normal distribution sample and one non-normal distribution sample and use the boxplot-whisker and histogram to visual them. import numpy as np import pandas as pd import scipy.stats as stats import matplotlib.pyplot as plt # Sample A: