Combined strategy

class src.lib.analysis.methods.combined.CombinedStrategy(name)

Bases: src.lib.analysis.basic.Basic, src.lib.analysis.arbitration.Arbitration, src.lib.analysis.performance_simulation.PerformanceSimulation, src.lib.analysis.report_analysis.ReportAnalysis, src.lib.analysis.summary.Summary

calc_CombinedStrategy()

Calculate the combined strategy which is a complex logic using other previous methods (e.g. MACD, RSI) or different sources (e.g. Machine Learning).

The first observation using data from many symbols is that the MACD by itself can produce relative positive performance (comparing to a buy-hold) strategy, if the stock is not on a strong upward (bullish) movement. To calculate the overall state of the stock, the average gains and average loses over the data period is calculated and produce a ratio:

\[Ratio = \frac{AverageGain}{AverageLoss}\]

Where the Average for both the Gain and Loss is done by sum of positive deltas (between days) or negative deltas (in absolute value).

A Ratio below 1.1 or 1.2, by empirical observation, seems the limit for produce better results with pure MACD.