| name | investing-backtesting |
| description | Use when running historical validation for this investing workspace. Covers both short-term and long-term backtests, reads the watchlist from input_config.json, executes the correct backtest command, and summarizes return, win rate, max drawdown, Sharpe ratio, and trade history before any recommendation workflow is trusted. |
Investing Backtesting
Use this skill when the task is to validate strategy performance rather than generate new trade ideas.
Working directory
Assume the skill runs from this directory:
/Users/anuragmohan/Documents/POC/investing
If the runtime starts elsewhere, change into that directory first or use absolute paths.
What this skill does
- Runs the short-term or long-term backtest workflow
- Uses the configured watchlist from
input_config.json
- Writes backtest snapshots into the
state/ directory
- Summarizes performance metrics and recent simulated trades
- Helps decide whether the strategy should be treated as healthy, conservative, or blocked
Commands
Run from the working directory above.
Short-term backtest:
python3 /Users/anuragmohan/Documents/POC/investing/main.py backtest --format text
Long-term backtest:
python3 /Users/anuragmohan/Documents/POC/investing/main.py longterm-backtest --format text
If JSON output is needed:
python3 /Users/anuragmohan/Documents/POC/investing/main.py backtest --format json --output /Users/anuragmohan/Documents/POC/investing/shortterm_backtest.json
python3 /Users/anuragmohan/Documents/POC/investing/main.py longterm-backtest --format json --output /Users/anuragmohan/Documents/POC/investing/longterm_backtest.json
Input files
- Watchlist, starting capital, risk preference:
/Users/anuragmohan/Documents/POC/investing/input_config.json
Backtest outputs are written to:
/Users/anuragmohan/Documents/POC/investing/state/backtest_results.json
/Users/anuragmohan/Documents/POC/investing/state/long_term_backtest_results.json
Expected summary
For each run, report:
- workflow name
- mode
- confidence
- total return
- win rate
- max drawdown
- Sharpe ratio
- total trades
If trade details are present, include a short sample of:
- ticker
- entry date
- exit date
- pnl
- pnl percent
Guardrails
- Do not claim a meaningful result if market data failed to download
- If the backtest returns empty metrics, explain that the run was not data-valid
- Treat win rate in context with return and drawdown, especially for longer-term trend-following systems
- Use short-term backtests for swing workflow validation and long-term backtests for position-trading workflow validation
Scheduling guidance
Recommended cadence:
- short-term backtest: once daily after market close
- long-term backtest: once daily after market close
It is fine to run both in the same scheduled job if the environment has stable market data access.