Leverage historical data for backtesting the MACD trading strategy for ANY ticker using Toucan and Python.
Moving Averages Convergence Divergence (MACD) is a widely used trading signal for detecting trend reversals.
By design, moving averages lag the underlying time series. As a result, the triggers from trading strategies purely based on Simple Moving Averages are often delayed resulting in missed opportunities or even losses.
MACD signal overcomes this drawback to some extent. The MACD signal is defined by three components -
1. MACD line: Difference between a slower EWMA and a faster EWMA.
2. Signal Line: EWMA of the MACD Line.
3. MACD histogram: Difference between the MACD line and the Signal Line.
A survey of evaluation metrics for training a multi-label classifier in python
In a traditional classification problem formulation, classes are mutually exclusive. In other words, under the condition of mutual exclusivity, each training example can belong only to one class.
In such cases, the classification errors occur due to overlapping classes in the feature space.
However, often we encounter tasks where a data point can belong to multiple classes.
In such cases, we pivot the traditional classification problem formulation to a MultiLabelClassification framework where we assume each label to be a Bernoulli random variable representing a different classification task.
Leveraging Explore Exploit strategy for determining the optimal price for a product.
The COVID-19 pandemic hit us hard in 2020 and forced us to seek safe havens by practically giving up on socializing. The pandemic also severely affected business and economic growth across industries and nations.
It also changed the way we have been conducting businesses until now. The lockdown and physical distancing measures presented a unique challenge to the brick and mortar retail stores that rely heavily on foot traffic for moving their products.
The pandemic has forced people to adopt online shopping more comprehensively for their daily needs.
The whole shift in paradigm has prompted businesses to start building an…
Testing the conditions for proving the convexity of mean squared error (MSE) function used in the context of Linear Regression.
The previous blog — The Curious Case of Convex Functions, focused on laying the foundation for testing the convexity of a function. It enumerates different ways to test/prove the convexity of a function.
In this article, we shall put that knowledge to use by proving the convexity of the Mean Squared Error loss function used in the context of Linear Regression.
With that in mind, let us start by reviewing -
The MSE loss for a Regression Algorithm.
Conditions for checking Convexity.
MSE Loss Function -
The MSE loss function in a Regression setting is defined as -