Skip to content
All projects
Research Platforms

Computer Vision with Deep Learning Project (TriFrame)

triframe-cv

Tests whether pictures of price charts at three time scales — a 104-bar weekly chart, a 126-bar daily chart and a 140-bar hourly chart — tell a model anything about a US stock's next 20 days of volatility, its chance of a 10% drawdown, or whether it beats the median stock over 5 days, beyond 33 ordinary numerical features computed from the same price history. The main run uses 500 of 979 US stocks and 236,520 chart sets from 2001 to 2022. The sample contains only stocks that survive to 2026.

Seven pretrained networks — ResNet-18, EfficientNet-B0, ViT-B/16, ConvNeXt-Tiny, Swin-T, DINOv2-S and MobileNetV3 — are used both frozen and fine-tuned, alongside three randomly initialised ResNet-18s as controls. Splits follow time (train 2001–2016, validation 2017–2019, test 2020–2022, each with a 20-day purge). Heads are tuned on validation only (1,881 configurations, all logged), and comparisons carry month-block bootstrap confidence intervals. The test years and the 2023–2026 holdout were read by earlier runs of the project, so these results are a historical check, not a clean test.

Results on the 2020–2022 test years. Twenty-day volatility: R² 0.503, against HAR 0.478, EWMA 0.448, GARCH 0.433 and a rolling estimate 0.416; the gain over GARCH is significant, the gain over HAR is not, and under QLIKE the simple models win. Drawdown of 10% or more within 20 days: AUC 0.648. Five-day direction: AUC 0.510, no detectable edge. Label-shuffle and random-weight controls find nothing, as they should.

A Streamlit dashboard takes three TradingView screenshots (1W, 1D, 1H) for up to four companies. It reads each image's ticker, timeframe and last bar with OCR, confirms them against market data, rebuilds the exact model inputs, and returns expected volatility, drawdown probability, a risk ranking and a Monte Carlo fan of price paths, with NO TRADE as the default decision.

AI assistants, principally Claude Code, wrote most of the code, proposed much of the statistical design, ran analyses and drafted the working paper under the author's direction; the paper's Appendix B itemizes this use.

No gain in overall R², a gain within months

The pre-specified test finds no gain from chart images in overall R² on the test years (+0.003, 95% CI −0.018 to +0.026). Splitting the error shows why: within each month, images raise R² by +0.020 (95% CI 0.011 to 0.027), while the market-wide level forecast does not improve, and the two offset. That test was chosen after seeing the data, so it needs confirming on new data. Adding hourly realised volatility does not explain the gain. On the test years the risk flag separates risk (realised volatility 56% a year against 30%), but it gives no evidence of timing ability. Details are in the working paper: https://github.com/harshatangirala/triframe-cv/blob/main/paper/Tangirala_What_Do_Charts_Add.pdf

Computer visionFine-tuningVolatility forecastingForecast evaluationNO TRADE
Next projectapex-quant-ai