Hindsight Optimal Position¶
- src.boatwright.Indicators.hindsight_optimal_position.hindsight_optimal_position(price, period=10, percent_change=1, debug=False)¶
- searches backwards for the most recent ‘percent fee price change’ and returns the appropriate position
1: in the market
-1: out of the market
0: no significant price change, uncertain optimal position
- Parameters:
price (Series) – price data
period (int) – max number of indexs back to look for a price change
percent_change (float) – change in price to look for, given as a percent