Audit a TradingView trade log for inflated Sharpe and concentrated profit
Print a tearsheet with Sharpe, Sortino, Calmar, and max drawdown for your CSV
Convert a Pine Script strategy to Python and diff it against the TradingView log
Switch annualization between stocks 252 and crypto 365 days for accurate risk numbers
Install with pipx and point the CLI at a TradingView trade log CSV; choose stocks 252 or crypto 365 annualization to match your asset class.
survival-alpha is a small command-line tool written in Python that audits trading strategy backtests for amateur quant traders. Its tagline in the README is that your backtest is lying to you and this library catches it. The user gives it a trade log exported from TradingView, runs one command, and gets back a report of how the strategy performed along with sanity checks that try to flag common bugs and self-deception. In its first mode, the tool reads a CSV file of trades, then prints a tearsheet. The numbers include total return, compound annual growth rate, Sharpe and Sortino ratios, Calmar, maximum drawdown, win rate, profit factor, average win and loss, and average trade duration. The README is clear about the hygiene checks too: it looks for trades with strange durations, trades that enter and exit on the same bar, P&L numbers that do not reconcile, suspiciously high Sharpe ratios, profit that is concentrated in a tiny number of trades, and profit that only came from a single time period. A second mode, listed as version 0.2, converts TradingView's Pine Script strategies into Python and then runs a backtest, optionally diffing the result against a reference TradingView trade log. The README shows a sample output with emoji icons next to each check, so passes and fails are easy to spot. Install instructions point to pipx, which the README describes as an App Store for Python command-line tools. The CLI is invoked as sa, reads files from local data and convert folders, and supports a flag to switch annualization between stocks (252 days per year) and crypto (365 days per year), since that choice changes risk numbers. The project is MIT licensed and the author also runs a Substack and X account.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.