0
$\begingroup$

Let's say we have an OHLCV dataset for a universe of stocks. We want to create features based on these price data. Since each stock may have a very different price range from the other if we just take log-delta (eg. open-close) a stock that has a price range around 1000-2000 would look very different from another that has a price range of around 1-10. This will happen also for stock (or any instrument) that has a drastic shift in prices over time. For instance, BTC recent steep rise in value.

What would be a good way to standardize or normalize these features across different stocks of various price ranges?

$\endgroup$
2
  • $\begingroup$ What do you want to normalize? The price or the volatility? These are two different things. $\endgroup$ Commented Apr 19, 2022 at 15:05
  • $\begingroup$ @RalphWinters: Thank you for your reply. The price change. The general issue with log/percentage change is that the values we have during training may not appear in out-of-sample. This is not an issue if your model could extrapolate well, but a model-like decision tree doesn't handle this. $\endgroup$
    – hugh
    Commented Apr 21, 2022 at 2:56

2 Answers 2

2
$\begingroup$

Log returns are usually sufficient to place different stocks on the same scale. Yes, some stocks may have 100% returns when others have 1%. And you can standardize them (mean=0, stdev=1). But, isn't this a feature that you want your model to capture rather than remove by normalization or standardization?

$\endgroup$
0
$\begingroup$

@hugh. You might try to add a feature by standardizing the stock price via dividing the price by the standard deviation, similar to how a Sharpe ratio is used to factor in volatility when comparing historical returns. When looking at the price data historically, you would need to get an estimate of the volatility which existed for each price data point. You could do this by calculating the standard deviation for the historical data point over the previous x number of days, or use an implied volatility. I would also keep the original stock price in the model since price/standard deviation not unique for each stock price, but adds value as a feature.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.