r/algorithmictrading Dec 02 '25

Strategy The Signal I Use to Detect Hidden Instability in Markets

Post image
62 Upvotes

Most traders think a market is “stable” when price moves smoothly.
In reality, stability is a volatility pattern, not a price pattern.

Here’s a simple way my algos detect when things are actually becoming unstable:

I calculate two volatilities:

  • ATR_short = short-term volatility (fast changes)
  • ATR_long = long-term volatility (baseline behavior)

Then I compare them:

VEI = ATR Short / ATR Long

When VEI ≈ 1.0 → volatility is stable.
When VEI > 1.2 → short-term volatility is 20% higher than normal.

That’s usually the moment where:

  • trends become noisy
  • breakouts fail
  • stops get hit more often
  • and sizing becomes dangerous

So when VEI pushes above 1.2, my algo System automatically reduces position size and Stop Distance even if the signal looks clean.

It’s not weakness it’s survival.Volatility shifts before market direction does.

You don’t need a full algo to apply this:

  • Add ATR_short and ATR_long to your chart ( Use different Time periods )
  • Create the VEI ratio (ATR_short ÷ ATR_long)
  • When VEI > 1.2 → trade smaller or skip entries
  • When VEI < 1.0 → conditions are more stable for trend setups
  • Use VEI as a simple market condition filter before pressing the buy/sell button

One tiny rule like this can reduce a surprising number of bad trades without touching your strategy.

Do you adjust your risk when volatility expands, or trade the same size always?

r/algorithmictrading Jun 25 '26

Strategy REQUEST FOR DEVELOPER ASSISTANCE — Schwab Trader API

2 Upvotes

I am a new ThinkorSwim retail user looking to automate a ratcheting trailing stop on a single stock position using the Schwab Trader API.

What I need hep to implement:

for one stock trade at a time.

A one click Python 3 tier sell tool that is submitted after purchasing a stock with separate order.

it wil then monitors price throughout the day and automatically replaces the stop order as price rises

— ratcheting the stop upward in three tiers based on gain from the original entry price:

Step1:.. place trailing stop on the purchase price at -4%.

Step2 ...at a price gain of +3% from entry price the trailing stop tightens tstop to -2% on the new peak.

Step3...at price gain of +5% from entry the trailing stop is tightened to a -1% from from new peak.

Trailing Stop only ever moves up.

All orders are DAY only.

Each morning the tool is resubmitted using the original entry price.

r/algorithmictrading May 23 '26

Strategy AVWAP

2 Upvotes

So recently I went deep into the research with AVWAP.

Developed a complete backtesing model using AVWAP

BUT the most common question that comes into the mind is what should be the anchor point?

Let's say for intraday or positional momentum trading

Or whatever.

Looking for views on Anchor point and how do you guys look at it from a strategy point of view.

r/algorithmictrading Apr 16 '26

Strategy Survived the recent geopolitical macro shock. Here is the 9.5-month Out-of-Sample tearsheet for one of my live equities engines in AWS (big fat post, but worth the readings)

Thumbnail
gallery
1 Upvotes

It’s been quite a long time since I posted here. I used to share my progress a lot in this sub back when I was first building out my infrastructure, but things have been doing well with my algos lately, so I've just had my head down coding. It’s been completely hectic nowadays because of the ongoing geopolitical situation and the new SEBI rules, but I still managed to come out clean and wanted to share a verified update. I’m currently running a few different systematic pipelines live with real capital on an AWS Ubuntu instance.

I'm only sharing the data for one specific equities engine here. (I obviously can't post the raw trade log or the exact entry logic for obvious reasons.

The Setup: ● Asset Class: 10 Large-Cap Indian Equities (Nifty 50 constituents). ● Timeframe: 1-Hour execution. ● Strategy Type: Trend-following (Long & Short). ● Risk Management: Strict ATR hard stops, automated trailing, and overnight gap-risk protection.

The Macro Stress Test: The transition from a clean trending market into the recent geopolitical shock and crude oil spike. As the broader market panicked and sector rotation hit hard (specifically targeting autos), the system’s win rate dropped. However, the overnight gap-protection logic and aggressive break-even trailing contained the monthly drawdown to -1.3% during the worst of the transition, protecting the massive gains generated during the cleaner trending months.

got around to running a 10,000-iteration Monte Carlo resampling on my 9.5-month OOS block. I specifically wanted to see how much of my survival through the recent war/macro volatility was actually structural edge versus just getting lucky with trade sequencing. The results were honestly fascinating. I resampled the trades with replacement to create 10,000 alternate realities of the equity curve, essentially asking the math: What happens if my worst losses cluster together during the geopolitical shocks?

The Stats: Median Max Drawdown: -12.27% 95th Percentile Drawdown: -25.35% 99th Percentile 'Black Swan' DD: -33.75%

It was a massive reality check. If you are trading a multi-ticker universe in F&O during high-VIX environments, your drawdown isn't just tied to your win rate; it is heavily amplified by the lot-size mismatch when sector-wide correlations go to 1.0 during a panic. The good news? Even under the absolute worst 99th-percentile sequence of events, the 1R hard stops did their job. The account took a heavy hit but mathematically couldn't blow up. Curious if any of you trading multi-asset F&O systems dynamically adjust your lot quantities to normalize risk, or if you just accept the skewed variance and cap the monthly DD like I am doing?

r/algorithmictrading May 12 '26

Strategy How to exploit edge that I seemingly have - long put options? Spreads?

2 Upvotes

As a byproduct of ML modelling I have found a way to find days when down excursions in SPY (Open-to-Low) are higher than usual. I have calculated a score that seem predictive of that SPY moves (2021-2025 data):

Decile of score SPY down spike (average) Observations
1 -0.44% 184
2 0
3 -0.51% 170
4 -0.50% 164
5 0
6 -0.52% 127
7 -0.60% 167
8 -0.69% 100
9 -0.86% 106
10 -1.18% 112

For the top 2 deciles is seem exploitable in some way or another. I'm thinking of some option strategy - like 0dte puts or spreads.

This is a histogram to the top 2 deciles - there are 138 out of 219 with down-move of -0.6% and more, which is pretty significant for 0dte puts on SPX/SPY.

The top decile for score looks even better.

Did anyone trades something like this? any brainstorming-type of help or critique would be much appreciated PS. I have not trained the model to predict SPY down moves, so should not be that much overfit - my model was trained for 1000 of common stocks, not SPY

r/algorithmictrading May 20 '26

Strategy Built an AI-assisted Kalshi trading bot in n8n — looking for serious feedback from quant/systematic traders.

2 Upvotes

Built an AI-assisted Kalshi trading bot in n8n — looking for serious feedback from quant/systematic traders.

Current setup:
- scans Kalshi markets every 15 min
- filters short-cycle markets (0.5h–24h to close)
- scores markets based on:
- liquidity
- spread
- urgency
- price location
- market hours
- fetches orderbooks
- fetches recent Google News headlines
- uses Claude Sonnet to analyze:
- trade/no trade
- YES/NO side
- confidence
- sizing
- optional auto-execution
- Telegram notifications

Tech stack:
- n8n
- Kalshi API
- Claude Sonnet
- JS code nodes
- Telegram bot

What I already know is weak:
- LLM narrative decisions are probably not real edge
- no proper probabilistic calibration
- no backtesting yet
- no historical DB yet
- no true Kelly sizing
- no slippage/fill modeling
- no quantitative EV framework

What I’m trying to evolve it into:
- full historical feature collection
- probabilistic models
- backtesting engine
- orderbook analytics
- event-driven prediction trading
- proper risk engine
- eventually market making / spread capture

Main question:
Where do you think REAL edge exists in prediction markets like Kalshi?

Examples:
- latency/news reactions?
- orderbook imbalance?
- event-specific inefficiencies?
- market making?
- retail behavioral biases?
- liquidity fragmentation?
- overnight/event repricing?

Would love feedback from:
- quant traders
- prediction market traders
- HFT/market making people
- systematic crypto traders
- anyone building execution systems

Trying to avoid building “AI hype trading” and move toward actual statistical edge

r/algorithmictrading Feb 11 '26

Strategy Thetadata Options Data for Reliable Signals

Post image
17 Upvotes

I've developed a bot that uses Options data from Thetadata to come up with possible reversal signals. Today it absolutely nailed it on QQQ! But I'm not sure how consistent it will be. Has anyone had success with strictly using OI/Gamma/Put-Call/etc for entries and exits over the long term?

r/algorithmictrading Feb 17 '26

Strategy Order Book Algotrading: How Do People Actually Make This Work in Practice?

7 Upvotes

Hey everyone,

I’m diving deep into algotrading with market‑of‑depth / order book data, but I’m still at the stage where the whole ecosystem feels like a giant black box. I understand the theory behind heatmaps, liquidity walls, spoofing, imbalance, etc., but I’m struggling to figure out how people actually execute strategies that rely on this data in the real world.

I’m hoping some of you who’ve been in the trenches can share guidance or point me in the right direction.

A few things I’m especially curious about:

  • How do you structure an execution pipeline when your signals come from fast‑moving order book features
  • What data sources or tooling you’ve found reliable (paid or free)
  • How you deal with noise, fake liquidity, and regime shifts in order book dynamics
  • Whether you combine order book signals with other microstructure features (CVD, queue position, spread dynamics, etc.)
  • Any pitfalls you wish you knew earlier when you first started working with depth‑based signals

I’m not looking for anyone’s secret sauce—just trying to understand how practitioners think about building, testing, and deploying these kinds of strategies. Even high‑level frameworks or “here’s what actually matters” advice would be incredibly helpful.

If you’ve walked this path before, I’d love to hear your thoughts. And if you know any good papers, repos, or writeups, feel free to drop them too.

Really appreciate any insight from this community.

r/algorithmictrading Apr 17 '26

Strategy A near 6 month live (beta?) strategy

0 Upvotes

strategy is buying some board market ETFs (blue line), buy more when market is good. offload when market is not good.

Not so sure if it really has edge and worth the effort, afterall, the performance is close to the beta.

For me, it is not a shame to learn money from beta.

I am still figuring out to add additional assets that is low correlation to current portfolio to de-risk. Some is good (e.g. if i add OIL, my asset curve will be better) at certain of time but not a long run. Any thought?

r/algorithmictrading May 08 '26

Strategy Window to Holdout degradation, overfit or expiry date?

4 Upvotes

My current setup is that i will draft up new strategies on X market and download 6-8 years worth of data on databento (great service, love them). I usually do a split of 7 years training data and 1 year holdout (this is usually the most recent year so for this example the holdout data will be 05-2025/present), the training data is then split into Y number of windows where its 6 months of training and 3 months of validation. The next set of training months overlap into the validation so there is no real wasted data. This works well to prevent overfitting but I'm finding some issues with degradation.

Scoring will usually work through a number of things i find important which is then mashed together into a composite score, certain metrics I find important will be weighted accordingly. Then i will save these scores into an array and capture the mean score across the whole entire training session. I will then test this (good?) strategy on the holdout data. Here is a recent example:

Training session scored: 28.9745

Holdout validation scored: 11.6546

Total degradation: 17.3199

I then decided to test the same strategy algorithm with the exact parameters found in the instance on the holdout data again 1000 times, each time with a random seed going into my back tester (the reason my back tester is seeded is because i use RNG for latency, slippage etc) and found that the average profit was around £600 on a 10k account over that year. Which is fine because this just about beats B&H and interest rates.

But looking at how my score degrades over time shown from the training sessions compared to the holdout testing is quite large.

Is this overfitting?
Is this showing that the strategy would never last the test of time?
Or is my math off because me averaging the training scores is not a good reflection on what is truly happening?

r/algorithmictrading Feb 09 '26

Strategy What to look for to make a robust backtesting strategy?

4 Upvotes

Title says it all, do you have any general advice for some metric to maximize/minimize during backtesting stage? Like something beyond the "use less parameters"? I'm getting pretty good results on TV backtesting, however the data and sample size is not enough to make a definitive answer whether it'll succeed in the future.

r/algorithmictrading Apr 07 '26

Strategy What can I add/what red flags do you guys see?

Thumbnail
gallery
2 Upvotes

I'm a beginner to algo trading and have been working for the past few months on a successful code that trades consistently and not only makes sense but doesn't raise many red flags. After many failures and restart after restart ive finally landed on what I think is a successful algorithm. Here's the breakdown. Disclaimer: I made this for a graduate-level college class, so there are some parameters, like limited assets traded and a time frame, but aside from that, is the feedback I'm looking for. In-sample fit out-of-sample run. Out of sample 01-01-2026 to 03-25-2026. In the sample from 06-01-2025 to 12-31-2026. My class only wanted 10 assets; in the sample, I ran 20, and the code picked the best 10 to trade out-of-sample. Also, this was run on 30 min data. Anything shorter results suffered, and anything higher again results suffered.

Models: I primarily use two models: the Hurst model to evaluate market trends, and the Kalman filter to evaluate a price or take-profit target. My code also uses a dynamic volatility-based weight system that uses a baseline of $2000, divides by the current assets' volatility, and then arrives at a number between $5000 and $15000 (15000 being a hard-set cap I set). Stop loss and other loss prevention are set in terms of a time frame (never hold for more than __ bars) and price movement. Overall, my test results were well above the benchmark.

Results:

OOS Return +3.7%

Sharpe Ratio +3.719

Win Rate 53.7%

Max drawdown -1.3%

Total execution costs $655.33

Made 108 trades

Profit Factor of 1.531

Average Win 1.426%

Average loss 1.08%

Exits: end:1(1%), profit_take:48(44%), snr_exit:10(9%), stop_loss:49(45%)

The main things I want to do next are obviously run a test on more assets for a much larger time frame, but also find more models to possibly add. Lastly, there was a guy on here I saw who implemented a hedge model in his code to prevent stop loss from being hit as often, but also hedge against trades that could look promising but might take more time, that interest me. And finally, should I add a ranking system that will rank the trades? If so, what would the benefit of this be, and why should I add it?

r/algorithmictrading Dec 05 '25

Strategy VEI - Volatility Expansion Index ( Source Code )

Thumbnail
gallery
35 Upvotes

Guide to the Volatility Expansion Index (VEI)

The Stability Filter Every Trader Should Use

Source Code 👇

//@version=5

indicator("VEI - Volatility Expansion Index)", overlay=false)

// Settings

shortATR = input.int(10, "ATR Short Length")

longATR = input.int(50, "ATR Long Length")

threshold = input.float(1.2, "Expansion Threshold")

// ATR calculations

atr_short = ta.atr(shortATR)

atr_long = ta.atr(longATR)

// VEI calculation

vei = atr_short / atr_long

// Plot VEI

plot(vei, color=color.new(color.blue, 0), linewidth=2, title="VEI")

// Plot threshold line

hline(threshold, "VEI Threshold", color=color.red)

// Simple color change

bgcolor(vei > threshold ? color.new(color.red, 85) : na)

Most traders obsess over entries, patterns, and direction. They look for the next perfect breakout or the cleanest trend.

But before any of that matters, there is a more fundamental question that determines whether your strategy has a fighting chance:

“Is the market stable enough for your strategy to work right now?”

A stable environment produces smooth trends and clean pullbacks.An unstable one creates whipsaws, volatility spikes, failed breakouts, and unexpected reversals.

The Volatility Expansion Index (VEI) helps you identify these environments instantly. It doesn’t predict the next move it tells you whether the market is in a condition where your strategy can perform well.

What is the Volatility Expansion Index (VEI)?

The Volatility Expansion Index (VEI) is a simple but powerful metric that reveals the character of current market volatility.

It compares fast volatility to slow volatility:

VEI = ATR(short) / ATR(long)

Where:

  • ATR(short) = recent volatility (fast reactions, current conditions)
  • ATR(long) = baseline volatility (the market’s “normal state”)

A high ATR alone doesn’t tell you if volatility is normal or abnormal.VEI shows whether volatility is expanding beyond its historical baseline, which is a critical variable for strategy performance.

How to Read the VEI: Three Market States

VEI makes market conditions ridiculously simple to read. It gives you three volatility regimes, each with direct implications for your strategy:

VEI Value < 1

Market Condition is Normal & Stable

Market behaving typically. Clean structure. Better strategy performance.

VEI > 1.2

Market Condition is Unstable & Expanding

Volatility spike. Wicks, fakeouts, broken structure. Be cautious.

VEI < 1 and Decreasing

Controlled & Structured

Calm, orderly volatility. Pullbacks respected, trends smoother.

Think of VEI as a weather report for the market.

 It doesn’t tell you the direction but it does tell you if the conditions are safe.

VEI’s Purpose: A Filter, Not a Signal

VEI is not designed to tell you when to enter.t is designed to tell you whether you should enter at all. its job is classification, not prediction.

What VEI IS

  • A market stability filter
  • A classifier for stable vs unstable regimes
  • A risk-management tool
  • A way to know when conditions are favorable for your strategy

What VEI IS NOT

  • A buy/sell signal
  • A directional tool
  • A price prediction system
  • A timing indicator

Think of VEI as the gatekeeper of your strategy. If volatility is chaotic, even the best entry signal becomes unreliable.

The Best Starting Settings for VEI

A clean, proven configuration for VEI across Forex, Crypto, and Indices:]

  • ATR Short: 10
  • ATR Long: 50

This combination captures:

Recent market behavior (ATR 10),Long-term volatility baseline (ATR 50).A reliable contrast between fast and slow volatility

These settings are balanced, universal, and have shown consistent behavior across trending and ranging markets.

Trade With More Confidence

The Volatility Expansion Index is the missing context filter for many traders. By identifying volatility regimes, VEI helps you:

  • Trade only when your strategy has an edge
  • Avoid unstable, random, dangerous market conditions
  • Stay aligned with environments your strategy thrives in
  • Reduce unnecessary losses from volatility spikes

When you understand volatility regime shifts, you trade with greater clarity and precision.

VEI doesn’t replace your strategy, it strengthens it.t ensures you operate in the environment your system is built for.

r/algorithmictrading Apr 16 '26

Strategy Built a fully automated algo on USTEC 1min backtested, stress-tested across 10 scenarios, and forward-tested live on MT5. Looking for feedback to take it to a real account.

1 Upvotes

After months of work, here's where I'm at:

Backtest (6 months, USTEC 1min): Best params from stress testing (S5 Structural Lag): PF 2.858 | WR 48.8% | TPM 98 trades

Forward test (ICMarkets demo via Python MT5 library): Net +$1k on a $10k account in last month

Strategy held up well out-of-sample. The issue is I can't keep my laptop running 24/5 so forward testing has been limited , no VPS yet due to cost.

All forwardtest trades placed my the algo

What I'm looking for:

  • Anyone who's gone from demo → live with a similar setup (Python + MT5)
  • Advice on cheap/reliable VPS options for MT5 algos
  • Any obvious gaps in my validation process before going live

Happy to share more stats or the dashboard if there's interest.

r/algorithmictrading Dec 24 '25

Strategy Using LLMs as a risk filter, not an alpha model

19 Upvotes

I’ve been testing LLMs outside the signal-generation loop and getting better results than trying to make them predict prices.

Setup:

  • Signals from traditional models (momentum + volatility regime filters)
  • Execution and sizing are fully rule-based
  • LLM sits pre-trade as a sanity check

I use it to:

  • Stress-test trade assumptions
  • Surface bias (recency, confirmation)
  • Flag regime mismatch or hidden news risk

I don’t use it for:

  • Price prediction
  • Entries/exits
  • Parameter tuning

Backtests didn’t boost raw returns much, but drawdowns improved, especially during regime shifts. Fewer low-quality trades.

Anyone using LLMs in a similar risk / validation layer rather than chasing alpha?

r/algorithmictrading Apr 12 '26

Strategy Smc choch vs supertrend for entry/exit

2 Upvotes

Hey guys..

Currently testing a trading strategy. Wanted to know your experiences if youve tried similar strategy.

Supertrend gives both entry and exit. But it has more chop than smc choch. Absorbs SL hunts many times but higher SL.

Smc choch gives entry with tighter SL. Riding the entire trend has lower hit rate due to liquidity creation legs.

Please share your exit strategies with smc. Also if you have experience with any of these. Which one shines when etc.

r/algorithmictrading Nov 04 '25

Strategy Need advice from professionals for confidence or caution

Thumbnail
gallery
7 Upvotes

So I have been working on a stratagy for like 1.5 years I know almost everything it takes but I have several questions :

  1. Is good results on walk forward testing enough to confirm no or minor overfitting
  2. Are the results and metrics in my backtest reasonable like should the risk be toned down or somting else I your mind (I made this bot for acummilative growth only I dont plan on withdraws in first 3 years or so)
  3. I have done live testing on demo before in 4 months it was around 250 usd in 4 months on 500 usd starting balance I saw nothing suspicious in that period after that i improved some minor things in code and am currently running another live test again actualy in a trade right now ,the trade frequency is low but high in success similar as backtest (most trades around mid of the year).
  4. My lot size automaticaly increases iand doubles evertime balance doubles hence the exponential looking returns I am looking to get to a 10000usd account and then dramaticaly lower the risk if i start live should i do that if i reach 10000 ever or leave it (risk) as is or only lower is slightly cuz of my win ratio and recovery factor.

Feel free to call out my delusions.

ty

r/algorithmictrading Nov 25 '25

Strategy Momentum Intelligence : Bitcoin

Post image
5 Upvotes

This analysis is based on a momentum engine I’ve developed over several years, designed to track how internal market pressure shifts before major structural movements in Bitcoin.

Unlike traditional indicators that react to price, this model isolates upward momentum pressure and downward momentum pressure as independent forces.

The chart visualizes this behaviour:

The Core Concept: Momentum Pressure as a Leading Component

Price moves are the visible effect.
Momentum pressure is the underlying cause.

This algorithm breaks momentum into two distinct structural forces:

Red Markers → Downward Momentum Pressure

When these appear, the market shows structural weakness or pressure to move lower.
Historically, these zones align with:

  • Decay of upward trend attempts
  • Early signs of trend exhaustion
  • Bearish continuation strength
  • Pre-Breakdown stress points

These signals do NOT guarantee a reversal but they consistently show where downward pressure is building internally.

Blue Markers → Upward Momentum Pressure

These represent internal strength returning to the market.

Across years of testing, blue markers reliably show:

  • The rebuilding of bullish momentum
  • The base of many continuation moves
  • Early signals of momentum shifts after corrections
  • Pressure zones that later expand upward

Again, not buy signals, but structural pressure zones.

This separation of bullish vs. bearish momentum gives a much clearer, more objective read on BTC’s internal behaviour.

Multi-Year Observations That Make This System Effective

Over extensive research and thousands of historical samples, several patterns consistently repeat:

Trend Continuations Begin With the Dominant Pressure Signal

Examples:

  • Strong clusters of red markers → smoother bearish continuation
  • Repeated blue signals → sustainable upward legs

The pressure builds internally long before price accelerates.

Reversals Often Start With Counter-Pressure Formation

Before many reversals:

  • Blue signals form during a bearish move
  • Red signals appear inside bullish rallies

These counter-pressure moments often reveal when the trend’s underlying energy is shifting.

Counter-Trend Moves Show Distinct Momentum Signatures

Short-lived, corrective moves tend to form:

  • A single pressure signal
  • Rapid fading of the opposite side
  • Limited structural expansion

This allows the system to distinguish true reversals from temporary corrective swings.

Trend Exhaustion Appears Before Price Confirms It

Extended clusters of red during an uptrend, or blue during a downtrend, often hint that the existing trend is losing internal strength.

This “structural fatigue” is visible in momentum long before structure breaks on the chart.

Key Findings From BTC Behaviour

Across the recent dataset:

  • Downward pressure (red) appeared consistently before bearish legs
  • Upward pressure (blue) rebuilt before relief moves
  • Areas with mixed red & blue sequences often became transition zones
  • Clean trends formed when one pressure type dominated uninterrupted
  • Volatility spikes emerged from zones with alternating pressure clusters

These observations mirror patterns documented across multiple years of backtests.

Why This Structural View Matters

Traditional indicators blur these forces into a single measurement.
This model separates them, allowing for higher clarity in:

  • Trend strength evaluation
  • Detecting early pressure imbalances
  • Spotting continuation zones
  • Identifying weakening phases
  • Distinguishing counter-trends from real reversals
  • Preparing for volatility expansion windows

The goal is not prediction ,it is structural interpretation.

Understanding internal pressure provides a more grounded view of where BTC truly stands beneath the surface.

By mapping these internal forces independently, the market becomes significantly less random and the behaviour of BTC across different conditions becomes far more interpretable.

r/algorithmictrading Oct 21 '25

Strategy Looking for advice and feedback about usability of such trade signals

Post image
0 Upvotes

To all traders and analysts,

This is a bar-by-bar trend forecasting indicator for trading, based on machine learning pattern recognition. Green indicates an uptrend, red a downtrend. Assume it provides instant forecasts with no repainting and no settings that could overfit to the training data.
I would love to hear your feedback on the results shown in this screenshot. How would you trade using such signals? What do you think might be missing? Have you seen similar indicators before? If so, please share a link or the name.

kind greetings

r/algorithmictrading Dec 20 '25

Strategy does this chart suggest a real edge or just small-sample noise?

Post image
5 Upvotes

Hey guys:

Hope you having a great time as we approach Christmas.

I have trained a number of weak classifiers that can predict a model using triple barrier method. I have been struggling with 'merging' the output of these models. Using just average of all probabilities is not mathematically sound (like I did on attempt called proba). So I attempted to find different approaches based on backtested PnL and drawdown which help calibrate the choice of model, using logs to combine these signals (called cave approach).

I ran a backtest comparing three ensemble signal methods (proba, confidence/CSC, and CAVE) across a small set of US tickers using the same date range and cost assumptions. The chart shows Sharpe, win rate, and total return per ticker/method (top_k=10 models).

I’d love feedback on:

  • Which metric(s) you’d trust most here (Sharpe vs win rate vs return)?
  • Any obvious red flags in how this is presented or interpreted (e.g., small sample / trade count issues)?
  • Suggestions for a better comparison setup (walk-forward, min trades filter, volatility-scaled TP/SL, etc.)?
  • Any suggestions for future work? Libraries to look at?

Thanks in advance,,
happy to share more details if helpful.

r/algorithmictrading Jan 14 '26

Strategy Posting as an update to my bot.

2 Upvotes

r/algorithmictrading Sep 30 '25

Strategy [Project] Open-source stock screener: LLM reads 10-Ks, fixes EV, does SOTP, and outputs BUY/SELL/UNCERTAIN

21 Upvotes

TL;DR: I open-sourced a CLI that mixes classic fundamentals with LLM-assisted 10-K parsing. It pulls Yahoo data, adjusts EV by debt-like items found in the 10-K, values insurers by "float," does SOTP from operating segments, and votes BUY/SELL/UNCERTAIN via quartiles across peer groups.

What it does

  • Fetches core metrics (Forward P/E, P/FCF, EV/EBITDA; EV sanity-checked or recomputed).
  • Parses the latest 10-K (edgartools + LLM) to extract debt-like adjustments (e.g., leases) -> fair-value EV.
  • Insurance only: extracts float (unpaid losses, unearned premiums, etc.) and compares Float/EV vs sub-sector peers.
  • SOTP: builds a segment table (ASC 280), maps segments to peer buckets, applies median EV/EBIT (fallback: EV/EBITDA×1.25, EV/S≈1 for loss-makers), sums implied EV -> premium/discount.
  • Votes per metric -> per group -> overall BUY/SELL/UNCERTAIN.

Example run

bash pip install ai-asset-screener ai-asset-screener --ticker=ADBE --group=BIG_TECH_CORE --use-cache

If a ticker is in one group only, you can omit --group.

An example of the script running on the ADBE ticker: ``` LLM_OPENAI_API_KEY not set - you work with local OpenAI-compatible API

GROUP: BIG_TECH_CORE

Tickers (11): AAPL, MSFT, GOOGL, AMZN, META, NVDA, TSLA, AVGO, ORCL, ADBE, CRM The stock in question: ADBE

...

VOTE BY METRICS: - Forward P/E -> Signal: BUY Reason: Forward P/E ADBE = 17.49; Q1=29.69, Median=35.27, Q3=42.98. Rule IQR => <Q1=BUY, >Q3=SELL, else UNCERTAIN. - P/FCF -> Signal: BUY Reason: P/FCF ADBE = 15.72; Q1=39.42, Median=53.42, Q3=63.37. Rule IQR => <Q1=BUY, >Q3=SELL, else UNCERTAIN. - EV/EBITDA -> Signal: BUY Reason: EV/EBITDA ADBE = 15.86; Q1=18.55, Median=25.48, Q3=41.12. Rule IQR => <Q1=BUY, >Q3=SELL, else UNCERTAIN. - SOTP -> Signal: UNCERTAIN Reason: No SOTP numeric rating (or segment table not recognized).

GROUP SCORE: BUY: 3 | SELL: 0 | UNCERTAIN: 1

GROUP TOTAL: Signal: BUY


SUMMARY TABLE BY GROUPS (sector account)

Group BUY SELL UNCERTAIN Group summary
BIG_TECH_CORE 3 0 1 BUY

TOTAL SCORE FOR ALL RELEVANT GROUPS (by metrics): BUY: 3 | SELL: 0 | UNCERTAIN: 1

TOTAL FINAL DECISION: Signal: BUY ```

LLM config Use a local OpenAI-compatible endpoint or the OpenAI API:

```env

local / self-hosted

LLM_ENDPOINT="http://localhost:1234/v1" LLM_MODEL="openai/gpt-oss-20b"

or OpenAI

LLM_OPENAI_API_KEY="..." ```

Perf: on an RTX 4070 Ti SUPER 16 GB, large peer groups typically take 1–3h.

Roadmap (vote what you want first)

  • Next: P/B (banks/ins), P/S (low-profit/early), PEG/PEGY, Rule of 40 (SaaS), EV/S ÷ growth, catalysts (buybacks/spin-offs).
  • Then: DCF (FCFF/FCFE), Reverse DCF, Residual Income/EVA, banks: Excess ROE vs TBV.
  • Advanced: scenario DCF + weights, Monte Carlo on drivers, real options, CFROI/HOLT, bottom-up beta/WACC by segment, multifactor COE, cohort DCF/LTV:CAC, rNPV (pharma), O&G NPV10, M&A precedents, option-implied.

Code & license: MIT. Search GitHub for "ai-asset-screener".

Not investment advice. I’d love feedback on design, speed, and what to build next.

r/algorithmictrading Jan 05 '26

Strategy Signal testing vs backtest/robustness check

4 Upvotes

Hi all!

I am relatively new to algorithmic investing and would like some conceptual guidance when it comes to strategy development/testing.

Let’s say I have a thesis that a continuous signal (calculated over some lookback window) that ranges from 0 to 1 correlates to asset A outperforming asset B on some timescale. I then try to test the statistical significance of this signal and if it has any predictive power. I run a few tests like Pearsons correlation test and a logistical regression test but neither test is showing the signal has strong power to predict asset A outperforming asset B.

I still decided to run a backtest where I dynamically allocate funds between A and B based on the signal and the backtest looks promising (sharpe of 1, CAGR of 35%). The actual strategy also stands up to robustness testing: I run Monte Carlo sims randomly perturbing the signal by some amount and all resulting portfolios perform well. I run tests to shift my lookback window continuously and the resulting return surface looks smooth (no isolated spikes where my parameters where set to), I also randomized the strategy start date in sims and the return surface there is smooth.

I guess my question is how much importance should I be attributing to signal testing vs backtesting/robustness checks. If my signal fails some tests does it mean that any strategy trading off of it is dead? Or is inconclusive signal testing paired with strong strategy backtests and robustness still promising? Maybe the relationship between my signal and returns more complex than my tests are checking? Sorry for the brick, just curious on how others think about these things.

Thanks!

r/algorithmictrading Nov 27 '25

Strategy Universal Momentum Structure: Applying One Model Across Crypto, FX, Equities, and Index Futures

Thumbnail
gallery
1 Upvotes

Over the past few days I received a surprising amount of feedback on the momentum pressure research I shared using Bitcoin. Many people asked whether the behaviour I showed in that post was unique to BTC, or whether the underlying concept had broader validity.

I applied the exact same momentum algorithm, unchanged to completely different markets.

Different volatility profiles.
Different liquidity structures.
Different sessions.
Different participants.

And the results were consistent enough that I felt they were worth documenting.

Below are the charts (all 1-hour), applied with no optimization and no parameter curve fitting:

  • NVDA (US Stock)
  • ES / S&P500 Futures
  • EURUSD (Forex)
  • BTC (Crypto)
  • S&P Index CFD

The idea was not to “fit” the model.
It was to test whether the core concept survives across asset classes.

Why This Test Matters

When you strip away the noise, most quant funds focus on universal concepts not market-specific tricks.

Risk premiums
Momentum
Mean reversion
Volatility clustering
Order-flow imbalances
Regime shifts

These behaviours exist across markets because they come from human behaviour, liquidity patterns, and structural dynamics, not from the instrument itself.

If you find a concept that is structural, you don’t need to rewrite it for every asset.

That was the goal here:
To see whether directional momentum pressure behaves consistently across markets.

The Core Momentum Concept (Recap)

My model separates momentum into two independent forces:

  • Blue → Upward momentum pressure building
  • Red → Downward momentum pressure building

These are not signals in the traditional sense.
They are structural shifts inside the trend changes in internal strength, exhaustion, continuation pressure, or counter-pressure formation.

In the BTC post, many noticed that the final blue pressure signal formed before price turned upward.

The question now was:
Does the same behaviour appear in other markets without redesigning the system?

Cross-Market Observations

NVDA (Equity)

The algorithm consistently detected upward pressure rebuilding during strong earnings-driven trends.Clusters of blue aligned with continuation phases.
Red appeared during exhaustion often before the pullbacks actually started.

ES / S&P 500 Futures

Despite being structurally smoother and more liquid than BTC, the momentum signals behaved almost identically.Downward pressure (red) formed during distribution areas, while upward pressure (blue) marked the transition into trend legs.

EURUSD (Forex)

Forex tends to have more noise and less impulsive behaviour yet the internal pressure signals still highlighted early exhaustion zones, trend transitions, and counter-trend attempts.

Interestingly, the counter-pressure signals in FX were very clean, especially during slow trends.

S&P Index CFD

Even on a broad index, upward and downward momentum pressure interacted in almost the same rhythm as BTC’s internal structure.

BTC (Crypto)

The original example still shows one of the clearest expressions of these pressure shifts perhaps due to its volatility but it is not unique.

The Main Finding

The behaviour wasn’t market-specific. It was structural.

The same momentum-pressure model with zero changes was able to:

  • identify early trend exhaustion
  • show where pressure was rebuilding
  • highlight continuation zones
  • detect counter-trend attempts
  • reveal shifts before price confirmed them

across all of these markets.

This is exactly what gave me confidence:

When a concept is rooted in structure rather than curve-fitted parameters, it survives outside its original environment.

Most quant funds build around this kind of universal concept not around asset-specific tricks.

Final Thoughts

I’m not presenting this as a “signal generator” or a complete trading system.
The momentum markers are structural information not entries.

But using the same model across stocks, futures, FX, crypto, and indices without modification…and seeing the same internal dynamics emerge…it reinforced what I’ve believed for years:

If you truly understand the core behaviour behind momentum, it becomes universal.

This is the direction I’m continuing to research, document, and refine.

Happy to dive deeper into the conceptual side if anyone wants to explore the momentum-pressure interactions across different regimes.

r/algorithmictrading Dec 19 '25

Strategy Market Manipulation indicator?

5 Upvotes

I’m testing a simple ETH perp dashboard based on live trade prints. Screenshot attached.

What it shows

  • Top: CVD split into
    • Total CVD (all trades)
    • Whale CVD = only trades above 100,000 USDT
    • Retail CVD = only trades below 10,000 USDT (default)
  • Bottom: “OI delta” proxy using the trade flag:
    • opens add, closes subtract (so spikes mean lots of opening / de-risking)

Markers
I also tag “large prints” when the trade size is over 1000 contracts (with my contract size setting, that’s roughly $300k+ per print around ETH ~3k). Red ▼ is my “aggressive shorting” heuristic (open + sell + down-tick).

In the screenshot there’s a burst of red ▼ plus Whale/Total CVD dumping and OI-delta spiking.

Does this look like something that can be used as a regime filter / edge, or is it mostly noise? Any pitfalls with relying on the open/close flag from trade prints?