Logarithmic vs. Arithmetic Returns
While standard arithmetic returns are intuitive, they break down over time due to compounding asymmetry (a 50% loss requires a 100% gain to recover). Log returns solve this. They are perfectly additive, symmetric, and statistically robust, making them the superior choice for predictive modeling.
Isolating Relative Strength (RS)
In quantitative finance, absolute returns are often a byproduct of a rising market. Relative Strength isolates the underlying asset's independent trajectory. By converting this into Log RS, we transform multiplicative compounding into a clean, linear series of daily outperformance.
Alpha (Skill) & Beta (Risk)
By running a rolling linear regression of the stock against the Nifty, we split its performance into two variables. Beta (β) is the slope: the stock's sensitivity to the index. Alpha (α) is the intercept: the mathematical proof of a stock generating value independent of market tailwinds.
The Z-Score Significance Filter
Just because a stock beats the market today doesn't mean the trend is real. The Z-Score calculates exactly how many standard deviations the current outperformance is from its historical mean (μ). If Z < 1.5, the move is treated as statistical noise and discarded.
Volatility & Drawdown Mechanics
Risk management is programmatic. Instead of rigid percentage stops, the engine calculates the Average True Range (ATR): a rolling metric of intraday volatility. The stop loss automatically widens for erratic assets and tightens for stable ones, optimizing the survival rate of the trade.