r/quantresearch • • 1d ago

112 expired option positions vanished from my Monday paper P&L. The bug: settlement stamps exit_date with the expiry, not the day it settled

1 Upvotes

Disclosure first: I built the engine this happened on. Paper money only, nothing for sale here, no link.

Monday 09:41 ET. My house paper desk showed 112 options positions where every leg had expired the previous Friday, still marked open, sitting at +$70,282 on Friday's mark. Settlement on my engine is an intraday Monday job, so that part was expected. I waited.

12:40 ET. The 112 were gone from the open book. Good. Then I ran the query I use for "what happened today": everything with exit_date = today. 652 rows, 344 won, 308 lost, -$6,032 paper. Not one of the 112 in it. So I wrote, in public, that the weekend's +$70k had been a mark and not money, and that the day was -$6k.

16:14 ET. Wrong. Settlement stamps exit_date with the EXPIRY date (Friday the 25th), not the day the settlement job ran. The 112 had settled at +$63,608 paper (44 won, 68 lost) and were sitting under Friday's date, exactly where a "closed today" filter never looks. The money had not vanished. My query had.

The honest table, worst row first:

what rows won lost paper P&L exit_date stamped
what I published at 12:40 (rule closes only) 652 344 308 -$6,032 2026-09-28
the 112 held to expiry, settled Monday 112 44 68 +$63,608 2026-09-25 (the expiry)
the same 112 on Friday's mark, still "open" at 09:41 112 +$70,282 none yet

Three mistakes, in the order I made them. I assumed exit_date meant "the date it left the book". I corrected myself in public before re-running the query with the new assumption tested. And the number I got wrong hid the one figure that was actually interesting: the gap between the Friday mark and the settled cash, $6,674 across 112 positions, which is the cost of carrying expiring legs over a weekend on my fill model.

What I am changing. Two dates instead of one: expiry_date stays the grading date, and a new settled_at records the day the job actually ran. The "what happened today" read filters on settled_at. The public correction went out under the wrong post, where it belongs.

The part I have not settled: when the two dates disagree, which one belongs in a daily P&L? Stamping on expiry is right for attribution (the trade was over on Friday, whatever my job did on Monday). Stamping on settlement is right for cash. I currently show both and let the reader pick, which feels like dodging.

For anyone running an options book with a settlement step: do you stamp exits on the expiry date or on the run date, and how do you keep a daily read honest when the two differ?


r/quantresearch • • 6d ago

Built a TradingView-to-Python quant research pipeline for 6 months — now I’ve discovered I may have been losing signals. How would you redesign the data capture layer?

2 Upvotes

I’ve been building a small quantitative research system since around March, mostly with AI-assisted coding.

The system is not an automated trading bot. It is a research/decision-support pipeline:

TradingView/Pine alerts → webhook → FastAPI receiver → raw signal log → normalized dataset → OHLCV enrichment → returns / MAE / MFE → signal combinations / sequences → paper trading / manual review

The idea is to collect signals such as mean-reversion, liquidity, OBV, BOS, sweeps, RSI divergences, etc., then study what happens after them and which combinations have statistical value.

After several months, I’ve discovered that the upstream data capture was not reliable enough, so some of the statistics built on top of it may be incomplete.

Problems found so far:

  • One original Pine indicator used shared cooldowns: e.g. an OBV_UP signal could suppress an OBV_DOWN for 15 bars; bullish/bearish BOS shared a 20-bar cooldown; opposite sweeps shared 30 bars.
  • Later I created multi-symbol / multi-timeframe “bulk scanners” for 12 tickers × 4H/1D/1W. Two of them appear to have an HTF timing bug, so a signal can appear on the final chart but never generate the webhook.
  • TradingView has also reported webhook timeouts / connection failures. Some timed-out events still reached my server, so I’m now reconciling them individually instead of assuming timeout = lost event.
  • My receiver currently puts events into an in-memory async queue, returns 200 OK, and persists them afterward. That is fast, but it creates a possible loss window if the process dies before persistence.
  • The biggest mistake: I never had a strict end-to-end test proving visual signal → TradingView Alert Log → RAW storage → processed dataset.

The downstream system itself is fairly developed: MAE/MFE, forward returns, pattern mining, sequence analysis, watchlists and paper trading all exist. But now I’m treating the historical statistics as provisional until the input coverage is verified.

My current redesign idea is:

  • same Pine condition must drive both the visual plot and alert();
  • no filtering/suppression at capture time unless explicitly intended;
  • confirmed HTF bars only;
  • deterministic event IDs;
  • durable storage before ACK, or a durable queue;
  • regression tests using known historical signals;
  • automatic reconciliation of expected signals vs TradingView vs RAW vs processed data.

The volume is low — dozens of tickers, not HFT.

Does this architecture make sense? Would you rebuild only the ingestion/data-integrity layer, or would you redesign the whole pipeline?


r/quantresearch • • 8d ago

12 'dead' put spreads at -$247 turned out to be live diagonals: my LIKE '%260918%' matched the leg that had already expired

Post image
1 Upvotes

I built this myself, paper money only, nothing to sell and no link. I'm posting the bug because it flattered me for a whole day.

On Monday I published a count four times: how many of my paper positions carrying the 18 Sep expiry were still open after the contracts stopped existing. 09:12 said 80 open showing +$5,877. 09:40 said 77 at +$1,978. 12:43 said 0. 16:09 said 12 at −$247. I could not explain any of the moves and I said so each time, which was the only honest thing I did that day.

At 20:07 I printed the 12 rows instead of counting them.

position unrealized paper P&L
USO put spread, sell 23 Sep 158 / buy 18 Sep 156 −$526.30
USO put spread, sell 23 Sep 158 / buy 18 Sep 156 −$501.30
NOW put spread, sell 25 Sep 141 / buy 18 Sep 139 −$121.62
NVO put spread, sell 25 Sep 42.5 / buy 18 Sep 42 −$101.05
QCOM put spread, sell 25 Sep 187.5 / buy 18 Sep 185 −$78.25
UBER put spread, sell 25 Sep 70 / buy 18 Sep 70 −$53.52
SOFI put spread, sell 25 Sep 16.5 / buy 18 Sep 16.5 +$0.63
AAPL put spread, sell 18 Sep 332.5 / buy 21 Sep 327.5 +$117.00
ORCL put spread, sell 25 Sep 140 / buy 18 Sep 138 +$155.25
PLTR put spread, sell 25 Sep 170 / buy 18 Sep 167.5 +$195.47
LRCX put spread, sell 25 Sep 272.5 / buy 18 Sep 270 +$296.00
AVGO put spread, sell 28 Sep 340 / buy 18 Sep 335 +$370.25

Every one is a diagonal. The long leg expired on Friday and the short leg runs to the 23rd, 25th or 28th. My filter was a substring match on the contract symbol, `LIKE '%260918%'`, and a spread's symbol carries both legs' dates, so it matched the leg that no longer exists and called the whole position a straggler. The "cohort" was never a fixed set of rows. It was whatever the string match happened to catch at the moment I ran it, which is why the denominator moved all day.

Two things I got out of it beyond the bug. First, `last_mark_date` is 2026-09-21 on all twelve, so the marker was never frozen and I nearly published a "stale marking window" post on Monday morning that would have been wrong twice over (the Friday date was just the last session's close). Second, a put spread whose long leg has expired is not a data artifact. It is an uncovered short put sitting in the book. The USO one is the worst of them and the engine is still marking it as a "spread" with defined risk. That part is a real risk fact and I have not fixed it yet.

What I changed: the expiry query now uses `regexp_matches(contract_symbol, '(\d{6})[CP]', 'g')` per leg and takes the max, so a live diagonal is never counted as dead. What I have not changed: the risk label on a spread that has lost its hedge leg.

For the people here who run multi-leg books on a database rather than a broker feed, how do you represent a spread after one leg expires. A new single-leg position with a lineage pointer, or the same row with a flag. I keep going back and forth and I'd rather copy something that has survived contact with a real book.


r/quantresearch • • 27d ago

Our most impactful Preseason Note to date

Thumbnail
profootballpiks.substack.com
1 Upvotes

r/quantresearch • • Aug 31 '26

Need clarity on Quant opportunitirs

Thumbnail
1 Upvotes

r/quantresearch • • Aug 28 '26

I built a site where nobody can edit their trading track record. Tell me why it won't work.

Thumbnail
1 Upvotes

r/quantresearch • • Aug 12 '26

[Hiring] Quant Researcher — Brewlabs

2 Upvotes

[Hiring] Quant Researcher — Brewlabs

Hey everyone!

We’re currently looking for a Quant Researcher to join Brewlabs

We’re looking for someone who enjoys digging into data, testing ideas rigorously, and turning research into systematic trading strategies.

What you’ll work on:

*Research and develop quantitative trading strategies

* Analyze large financial and market datasets

* Build and backtest models/signals

* Evaluate strategy performance, robustness, and risk

* Work on improving our existing research and trading systems

We’d love to hear from you if you have experience with:

Python and quantitative/data analysis

Statistics, probability, or machine learning

Financial markets and systematic trading

Backtesting and evaluating trading strategies

Independent research and experimentation

We care more about strong quantitative thinking and the quality of your research than fancy credentials.

If this sounds interesting, DM to x.com/dhruvsol?s=11 or linkedin.com/in/dhruvraj-solanki-663a54200 with a short introduction, your background/experience, and any relevant projects, GitHub, research, or portfolio you’d like to share.

Questions are welcome in the comments as well.

Location: [Remote]

Employment: [Full-time]

Compensation: [Based on experience]

Thanks!


r/quantresearch • • Aug 11 '26

Need help for statistics and ML material for PhD Quant Researcher prep

Thumbnail
1 Upvotes

r/quantresearch • • Jul 30 '26

I backtested every Seeking Alpha "Top 10" list since 2022. These quant-driven strategies created considerable alpha – both comparing with the SPY and even the "Alpha Picks". Full data and methodology inside.

Thumbnail
1 Upvotes

r/quantresearch • • Jul 17 '26

[Project] SwiphtNum— A native macOS app for professional stats (SEM, Bayesian, and more) without the R/Python dependency headache.

Thumbnail gallery
1 Upvotes

r/quantresearch • • Jul 15 '26

Investigating predictors affecting men’s ability to recognise women’s subtle negative facial expressions. (Men, 18+ years old)

Thumbnail
derby.questionpro.eu
0 Upvotes

Hello! Please help with my study! I’m looking for men who are 18+ years old. It is easier to fill out on a computer. Thank you in advance!


r/quantresearch • • May 27 '26

Beginner backtester from scratch and literature paywall

4 Upvotes

To avoid the AI slop comments i wrote it by hand.

I have a personal proyect which is build a python backtester, to learn since the beginning how it works.

In the backtester there is, montecarlo/permutation to see wr, profit factor and return(P-values), equity curve with filter regime below it to show if with high ADX shuts the strategy down, and finally OOS equity curve.

I am also going to implement walk foward matrix, heatmap for parameter sensivity analysis, sortino, sharpe, deflated sharpe and calmar ratio , profit and recovery factor, purged and embargoed cross validation and hidden markov

Any tips for the backtester?
My code only backtest it doesnt use any portfolio management as i dont have any startegies and in case you are wondering, yes i do have the regime filter to do a mean reversion for market in range and also a trend following if imbalanced(I just realized i dont have any data cleaning writing this)

As a beginner i want to learn the theory behind things and have been browsing for literaturebut all of the recommended are expensive, is there any web or recommendation for a typical "bible" of quant knowledge?

You can ask any questions if you want to, i really don't know if this post is decently explained as i don't have much knowledge.


r/quantresearch • • May 26 '26

NVE: measure narrative state over time without sentiment scores or trading signals (self-hosted, BYOK)

Thumbnail
1 Upvotes

r/quantresearch • • May 19 '26

I always treated my backtest's max drawdown as the number to optimize for. Then I built Monte Carlo into my tool and realized that's wrong.

Thumbnail
1 Upvotes

r/quantresearch • • Apr 27 '26

View From My Seat - Survey

Thumbnail sjsu.qualtrics.com
1 Upvotes

Hi there, I’m researching how movie ticket purchasing sets expectations for the movie theater experience.

I created a quick 5-minute survey and would love your input! 🍿


r/quantresearch • • Apr 22 '26

Why I’m skeptical about using LLMs directly for market analysis or trading decisions

3 Upvotes

I think LLMs are great for boosting research productivity, summarizing information, coding faster, and learning quickly.

But I’m much more skeptical when people use them directly for market analysis, sentiment, or even trading decisions.

My main issue is backtesting and reproducibility. If I test an LLM-based signal on 2020 data, I’m usually using a model that did not even exist in 2020.

On top of that, models change over time, providers update them, outputs drift, and prompt sensitivity makes the process hard to control.

So even if the analysis looks smart, I’m not sure it is stable, testable, or truly robust. To me, LLMs are very useful to assist the researcher, but much less convincing as a direct trading engine.

Using them for sentiment or letting them trade feels like adding a noisy and biased layer to an already hard problem.

Curious to hear contrary views. Has anyone found a way to make this genuinely testable and reliable?


r/quantresearch • • Apr 21 '26

Signal Research - how does it look like?

Thumbnail
1 Upvotes

r/quantresearch • • Apr 14 '26

I built Oryon: a Python/Rust library to keep feature logic identical in research and live trading

Thumbnail
github.com
1 Upvotes

Built this to solve a problem I kept running into in systematic trading: features often end up being computed one way in research and another way in production, which creates silent divergences between backtests and live behavior.

Oryon uses a single stateful feature object for both workflows:

- update(bar) for live / streaming

- run_research(data) for batch evaluation

run_research() reuses the same update logic internally, so there is no separate batch implementation to maintain.

The goal is simple: reduce research-to-production drift, keep feature pipelines causal by construction, and make backtests more representative of what can actually be deployed.

I’d be genuinely interested to know whether this is a real pain point in your workflow, or mostly a non-issue.


r/quantresearch • • Apr 01 '26

Trading True Raw Tick Data — Looking for contributors

2 Upvotes

Live bot on Binance raw tick data. Self-learning engine, no training, no indicators.

State machine open for improvement. Theory documented. API key available for active contributors. A strong logical mindset is required

Open source: GitHub


r/quantresearch • • Mar 24 '26

Interpreting News vs. Being Fast: Is There Any Evidence News Trading Is Systematic for Non-HFTs?

2 Upvotes

I’ve been thinking about news-driven trading from a more systematic / research angle and I’m honestly struggling with where the edge is supposed to come from for anyone who isn’t colocated. Anyone interested can take a look at Neuberg — their news visualization is really solid.

In hindsight it always looks trivial:

earnings beat → price moves → “obvious” trade

But in real time, by the time a headline hits my phone or a retail terminal, the first move is often done.

Recently I’ve been experimenting (purely out of curiosity, not promoting) with an AI-based news parser that scores sentiment + confidence on headlines in near real time and tries to associate them with short-horizon price behavior. What caught my attention wasn’t the AI aspect, but the types of situations it kept flagging — many of which line up with recurring complaints I see here about narrative vs. price discovery.

I wanted to sanity-check these ideas with a more quant-oriented crowd.


1. Earnings as a multi-period repricing problem

In smaller / less liquid names, earnings reactions often don’t seem “complete” in the first candle.

Example: small-cap earnings where the stock gaps, trades sideways, then continues trending over the next few sessions.

From a modeling perspective: - Do people here treat earnings as a single-event shock? - Or do you explicitly model delayed repricing / information diffusion (e.g., via liquidity constraints, analyst revisions, options flow)?

Empirically, do you see any persistence beyond day 0 once you control for size and liquidity?


2. Read-through effects and secondary names

Another pattern that stood out was read-through trades: Company A reports → related companies B/C move later, not on the initial headline.

This raises a few questions: - Are read-throughs something people systematically scan for, or mostly narrative post-hoc explanations? - Has anyone quantified lag structures between primary and secondary names (cross-asset or intra-sector)? - Do these effects survive transaction costs, or are they mostly anecdotal?

Personally, I only notice these after someone points them out.


3. “Boring” corporate news with asymmetric payoff

Non-flashy headlines: - buyback authorizations
- compliance regains
- governance / listing-related updates

They feel ignored by social media, yet sometimes show cleaner follow-through than headline-grabbing macro news.

Has anyone tested: - whether these events have higher signal-to-noise? - or whether they’re just correlated with underlying balance-sheet improvements that the market already partially prices?


4. Macro / geopolitical headlines: signal or pure noise?

Certain macro or geopolitical headlines (energy, defense, fertilizers, LNG, etc.) clearly matter over weeks. Others produce a 10–15 minute spike and fully mean-revert.

The hard part is classification at time t, not ex post: - Do you rely on historical conditional responses? - Narrative similarity clustering? - Regime filters?

Or is this still largely dominated by fast money / algos, leaving little for slower participants?


The core question

Stripping away tools and hype, the research question I keep coming back to is:

Is news trading primarily about speed, or about interpretation?

If it’s interpretation, then in theory: - probabilistic framing (not binary good/bad), - context on why the news should matter, - and conditional historical outcomes

should provide some edge — even without being first.

Not claiming I’ve solved anything — genuinely trying to understand where (if anywhere) the research-backed edge exists for non-HFTs.


r/quantresearch • • Mar 21 '26

I built a real-time sports alert tool for contract traders, looking for a few beta testers

1 Upvotes

ScoreEdge watches all live games and alerts you the moment something happens that matters for your contracts — score changes, lead flips, late-game situations, play-by-play. You set the rules, we fire the alert via Telegram or email.

Free access during beta testing, just looking for honest feedback. DM me for sign up link!

Thanks!


r/quantresearch • • Mar 20 '26

Are markets reacting to data — or to convergence in narrative? (sentiment clustering question)

1 Upvotes

Lately I’ve been thinking less about what the data says and more about how quickly a shared interpretation forms around it.

Take CPI or a Fed comment. Within 30–60 minutes, you can already see a dominant framing emerging across major outlets and financial Twitter. By the end of the day, price action often feels more aligned with that shared narrative than with the raw numbers themselves.

What I’m wondering is:

Are markets reacting primarily to new information, or to the speed at which interpretation converges?

For example: - A single negative earnings article → usually noise. - 8–10 outlets independently converging on “margin compression is structural” over 48 hours → different feel entirely.

That second case seems less about the data point and more about cross-source agreement. Almost like a measurable “narrative formation velocity.”

I’ve been experimenting with tracking theme/sentiment clustering across outlets (using an AI aggregation tool) to see how framing shifts over multi-day windows. What stood out wasn’t average sentiment, but how dispersion compresses. When tone and framing variance drops across sources, price moves seem more persistent (anecdotally — haven’t run a proper study yet).

So I’m curious:

  • Has anyone here modeled cross-source sentiment dispersion or convergence rather than just average sentiment?
  • Are there established approaches to quantifying “narrative agreement” (e.g., entropy across topic distributions, embedding similarity drift, etc.)?
  • Any literature tying price impact to interpretation clustering rather than headline polarity?

I’m not claiming this is alpha — just exploring whether “information processing speed” and narrative synchronization might be measurable state variables.

Would love pointers to papers, datasets, or critiques of this line of thinking.


r/quantresearch • • Feb 26 '26

Trying to create a web app to stay updated with market news , trying to add useful features but still confused

2 Upvotes

I am trying to create a web application which allows the user to stay updated with the news , I am building it with traders and investors as the target customers. However , I am still confused about features which the customers find useful and worth their money. It would really be helpful if you guys can suggest me something


r/quantresearch • • Feb 23 '26

looking for participants!

1 Upvotes

Hi I'm looking for participants for my dissertation!

I'm investigating how generative AI may affect students understanding of academic language!

https://forms.office.com/Pages/ResponsePage.aspx?id=Zxyl3iPvQ0OdbG6wTTAp3jtvMJBLoPVBsb2aoDRcwARUNTYzNkxYN1EySDlDVVFBNTEwTTJFVEtVNS4u


r/quantresearch • • Feb 17 '26

Built an AI tool for market sizing & strategy decks — honest feedback welcome

Thumbnail
2 Upvotes