MATLAB Answers

How does MATLAB calculate financial indicators?

6 ビュー (過去 30 日間)
Joseph Petrowski
Joseph Petrowski 2017 年 4 月 21 日
回答済み: Kawee Numpacharoen 2017 年 8 月 8 日
Hi,
I'm trying some basic inputs to get started in machine learning and finance. I am using the MACD and RSI as predictors in a classification model. I want to eliminate look-ahead bias.
When the MACD (or any other vector-input indicator) is calculated based on a vector of prices, does it include the price of its corresponding index in the calculation?
For example, if my input is a series of close prices, does the MACD calculated for 21 April include the close price of 21 April? Obviously, you wouldn't have the close price of the day you're trying to predict. Can I use the corresponding MACD vector, or will I need to backshift the results by one?
Thank you!

  0 件のコメント

Sign in to comment.

回答 (1 件)

Kawee Numpacharoen
Kawee Numpacharoen 2017 年 8 月 8 日
Instead of shifting all the predictors, you can just shift one response variable. Hope it helps

  0 件のコメント

Sign in to comment.


Translated by