cinar/indicator

Strategies should return nonnormalized recommendations

Closed this issue · 0 comments

I'm considering applying the following principles to the library to address these issues while maintaining overall functionality:

  • Indicators should calculate and return numerical values without interpreting them or having knowledge of specific transactions.
  • Strategies should be built upon one or more indicators. Their sole responsibility is to interpret indicator results and generate Buy, Sell, or Hold recommendations. Strategies should not handle transactions and can produce unnormalized recommendations in any order.
  • Backtests should be built upon strategies. They track transactions and normalize recommended actions accordingly.

Aligned with this, I will also add a parameter to the OrStrategy to have it operate on unnormalized or normalized recommendations.

I may have to do something similar for the Charts also, but have to think more.

Originally posted by @cinar in #159 (reply in thread)