allenfrostline / allenfrostline.github.io

1 stars 1 forks source link

blog/strategy-xgboost-classification-technical-indicators/ #5

Closed allenfrostline closed 11 months ago

allenfrostline commented 6 years ago

http://allenfrostline.com/2017/03/12/strategy-xgboost-classification-technical-indicators/

Strategy: XGBoost Classification + Technical Indicators - Allen Frostline

xFFFFF commented 6 years ago

Can You share rest code?

allenfrostline commented 6 years ago

@xFFFFF Can You share rest code?

Thanks for the reply, but this is it. I'm using the RQAlpha trading engine by the time of this post and all I need to specify here are the __config__ and the global function init. The engine then automatically backtests against the configurations and produces the output. If you've got your own trading engine or some other third-party one and don't want to bother reading the Chinese documentation of RQAlpha, I believe you can transplant this strategy smoothly there as long as you understand what it does. Therefore, please let me know if you find anywhere confusing in the code.

renanfilipe commented 6 years ago

Hello, thanks for sharing the code. I'm studying your code to try to learn more about XGBoost. What I understood so far is that you fed the model with historical data, with this data you built some technical analysis data and then you trained the model. My question is: How will I use your classifier if I don't know tomorrows OHLC? Can you share an example of you using your trained model to predict next's day average price change?

allenfrostline commented 6 years ago

@renanfilipe Hello, thanks for sharing the code. I'm studying your code to try to learn more about XGBoost. What I understood so far is that you fed the model with historical data, with this data you built some technical analysis data and then you trained the model. My question is: How will I use your classifier if I don't know tomorrows OHLC? Can you share an example of you using your trained model to predict next's day average price change?

Hi @renanfilipe, it's a very simple strategy targeting at whether the long-term trend of a stock is up or down. Check how context.signal is defined and manipulated.