SmaNaive
class backtide.strategies.SmaNaive(period=20)
Naive single Simple Moving Average trend-following strategy.
The simplest trend-following strategy: buys when the price is above a single moving average and sells when below. No second average or additional filter is used, so it reacts quickly but can generate many whipsaws in sideways markets. Useful as a baseline trend-following strategy.
| Parameters |
Moving average period.
|
| Attributes |
Human-readable strategy name.
is_multi_asset : bool
Whether this is a multi-asset strategy.
|
See Also
Passive baseline that buys once and holds indefinitely.
Trend-following strategy driven by short-term price momentum.
Simple Moving Average crossover strategy using fast and slow periods.
Methods
| description | Short explanation of what the strategy does. |
| required_indicators | Indicators that must be computed up-front for this |
method backtide.strategiesdescription()
Short explanation of what the strategy does.
| Returns |
str
The description.
|
method backtide.strategiesrequired_indicators()
Indicators that must be computed up-front for this
strategy.
Returns a list of indicator instances, already parameterised with this strategy's current settings, that the engine will auto-include before the simulation starts.
| Returns |
list
The required indicator instances.
|