Skip to content

Expand StrategyMarsi HK vs origin trade analysis - #2

Open
yafeng2003 wants to merge 1 commit into
mainfrom
codex/compare-backtest-results-of-strategymarsi
Open

Expand StrategyMarsi HK vs origin trade analysis#2
yafeng2003 wants to merge 1 commit into
mainfrom
codex/compare-backtest-results-of-strategymarsi

Conversation

@yafeng2003

Copy link
Copy Markdown
Owner

Motivation

  • Improve the existing StrategyMarsi origin vs 港股通 comparison by drilling into trade-level differences to determine whether missed large wins are caused by the universe (stock pool) or by the strategy signals.
  • Surface which high-return trades from the origin run are absent in the 港股通 run and quantify their contribution to overall performance.

Description

  • Add analysis/strategy_marsi_hkt_comparison.md that extends the previous report with trade-level diffing, per-trade listings, and a summary table of portfolio and trade metrics.
  • Identify origin-only trades by key (stockno, entry_date) and classify them by whether the ticker appears in the 港股通股票代码.csv list, and produce top-missing-winners tables.
  • Compute and display portfolio-level metrics (start/end assets, total return, CAGR, annualized return/volatility, Sharpe, max drawdown) and trade-level metrics (trade count, win rate, avg/median profit, avg win/loss, avg hold days) using ad-hoc Python analysis that reads backtest_results/StrategyMarsi_origin/* and backtest_results_hkt/StrategyMarsi/* CSVs.
  • Add a short conclusions section attributing most missed large wins to stock-pool coverage differences rather than signal failure on commonly-covered tickers.

Testing

  • Ran the analysis scripts that load StrategyMarsi_daily_returns.csv and StrategyMarsi_trade_analysis.csv from both universes and 港股通股票代码.csv, and the scripts completed successfully and wrote analysis/strategy_marsi_hkt_comparison.md.
  • Executed ad-hoc checks that printed trade counts, top missing profits, and summed profit contributions for origin-only trades, and those commands returned expected numeric outputs.
  • No unit or integration tests were added because this is an analysis/report-only change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant