QuantJourney Backtester

QuantJourney Backtester

Share product feedback

✓

Thank you.

Your note is now in the QuantJourney inbox.

docs/engine/examples-index.mdx

Examples Index

Runnable strategy examples mapped to engine features.

These examples should map to real files in the repository. Use this page to choose a runnable starting point.

Sourcestrategies/
LayerRunnable examples
ModeWeights and orders
Inputexample strategy files
Outputworking strategy patterns
Primary API./strategy.sh <strategy>
Main caveatDocs should reference real filenames, not illustrative names that do not exist.

Weight-Mode Examples

FilePatternRead first if...
strategies/sma_crossover.pySignals -> equal/capped weightsYou want the standard portfolio example.
strategies/sma_rebalance_daily.pyDaily rebalanceYou want baseline weight-mode behavior.
strategies/sma_rebalance_weekly.pyWeekly rebalanceYou want lower turnover.
strategies/sma_rebalance_monthly.pyMonthly rebalanceYou want EOD portfolio research.
strategies/sma_rebalance_monthly_drift.pyMonthly + drift triggerYou want conditional rebalancing.
strategies/sma_rebalance_monthly_dd.pyDrawdown circuit breakerYou want risk-managed rebalance behavior.
strategies/rebalance_comparison.pyMulti-policy comparisonYou want to compare turnover and performance across policies.

Order-Mode Examples

FilePatternRead first if...
strategies/market_orders.pyMarket entry/exitYou are learning order mode.
strategies/limit_orders.pyLimit entry and TPYou want passive entries or take-profit exits.
strategies/stop_orders.pyProtective SLYou want explicit stop-loss state management.
strategies/trailing_stop_orders.pyStandalone trailing stopYou want a dynamic protective exit.
strategies/bracket_orders.pyEntry + TP + SLYou want the cleanest fixed risk/reward example.
strategies/oco_orders.pyOne-cancels-otherYou need competing entry or exit orders.

Suggested Learning Path

  • Start with sma_crossover.py.
  • Compare daily, weekly and monthly rebalancing.
  • Read market_orders.py.
  • Move to bracket_orders.py for TP/SL.
  • Use stop_orders.py only when you need explicit state management.
  • Use oco_orders.py after understanding bracket orders.