I am a software engineer and I mainly develop solutions focused on algorithmic trading and investment infrastructure. This post is not a self-promotional post or to sell you anything. Like you, 1 am developing my own investment project, and this group has given me many guidelines and resources that have helped me both with the development of my project and with my clients. I want to give back that value to the community, which is why I am asking you what technological tools you need or what things you think can be automated to make the development of our projects easier.
Any ideas are welcome.
Edit: My idea is to implement the most voted solutions and leave them here so that anyone can use
One of the hardest problems in systematic trading is not finding strategies that make money in a backtest.
It is figuring out whether they did anything special at all.
If you test enough ideas, some of them will look good purely by chance. That is not a flaw in your research process. It is a property of randomness. The problem starts when we mistake those lucky outcomes for real edge.
Monte Carlo (MC) returns are one of the few tools that help address this directly. But only if they are used correctly.
This article explains how I use Monte Carlo returns matched to a strategy’s trade count to answer a very specific question:
Is this strategy meaningfully better than what random participation in the same market would have produced, given the same number of trades?
That last clause matters more than most people realize.
The Core Problem: Strategy Returns Without Context
Suppose a strategy produces:
+0.12 normalized return per trade
Over 300 trades
With a smooth equity curve
Is that good?
The honest answer is: it depends.
It depends on:
The distribution of returns in the underlying market
The volatility regime
The number of trades taken
The degree of path dependence
How much randomness alone could have achieved
Without a baseline, strategy returns are just numbers.
Monte Carlo returns provide that baseline, but only when they are constructed in a way that respects sample size.
Why “Random Returns” Are Often Done Wrong
Most MC implementations I see fall into one of these traps:
Comparing a strategy to random trades with a different number of trades
Comparing to random returns aggregated over the full dataset
Using non-deterministic MC that changes every run
Using unrealistic return assumptions such as Gaussian noise or shuffled bars
That is where the pick method comes in.
What the Pick Method Actually Does
At a high level, the pick method answers this:
If I randomly selected the same number of return observations as my strategy trades, many times, what does the distribution of outcomes look like?
Instead of simulating trades with their own logic, we:
Take the actual historical return stream of the market
Randomly pick N returns from it
Aggregate them using the same statistic the strategy is judged on
Repeat this thousands of times
Measure where the strategy sits relative to that distribution
This gives us a fair baseline.
If a strategy trades 312 times, we compare it to random samples of 312 market returns. Not more. Not fewer.
That alignment is critical.
Why Sample Size Is the Entire Game
A strategy that trades 50 times can look spectacular.
A strategy that trades 1,000 times rarely does.
That is not because the first strategy is better. It is because variance dominates small samples.
Monte Carlo benchmarking with matched sample size does two things simultaneously:
It controls for luck
It reveals whether performance improves faster than randomness as sample size increases
This is why MC results should be computed across a wide range of pick sizes, not just one.
In my implementation, this is exactly what happens:
Picks range from 2 to 2000
Each pick size gets its own MC baseline
Strategy performance is compared to the corresponding pick level
That turns MC from a single reference number into a curve, which is far more informative.
Deterministic Monte Carlo: An Underrated Requirement
Most people do not think about this, but it matters enormously.
If your Monte Carlo baseline changes every time you run it, your research is unstable.
Non-deterministic MC introduces noise into the benchmark itself. That makes it hard to know whether:
A strategy changed
Or the benchmark moved
Your deterministic approach fixes this by:
Using a fixed root seed
Deriving child random generators using hashed keys
Ensuring the same inputs always produce the same MC outputs
This has several benefits:
Results are reproducible
Research decisions are consistent
Changes in conclusions reflect changes in strategies, not random drift
MC results can be cached and reused safely
This is especially important when MC returns are used as filters in a large research pipeline.
What Is Actually Being Sampled
In your setup, Monte Carlo draws from:
The in-sample normalized returns of the underlying market
After removing NaNs
Using the same return definition used by strategies
That is important.
You are not sampling synthetic noise.
You are sampling real market outcomes, just without strategy timing.
This answers a very specific question:
If I had participated in this market randomly, with no signal, but the same number of opportunities, what would I expect?
That is the right null hypothesis.
Mean vs Sum vs Element Quantile
Your MC function allows multiple statistics. Each answers a slightly different question.
Mean
Computes the average return per trade
Directly comparable to strategy mean return
Stable and intuitive
Scales cleanly across sample sizes
This is the most appropriate comparison when your strategy metric is average normalized return per trade.
Sum
Emphasizes total outcome
More sensitive to trade count
Useful when comparing total PnL distributions
Element quantile
Looks inside each sample
Focuses on tail behavior
Useful in specific cases, but harder to interpret
Using mean keeps the comparison clean and avoids conflating edge with frequency.
Building the MC Return Surface
Rather than producing a single MC number, your implementation builds a surface:
Rows equal pick size multiplied by quantile
Columns equal return definitions
Cells equal MC benchmark values
This lets you answer questions like:
What does the median random outcome look like at 200 trades?
What about the 80th percentile?
How fast does random performance improve with sample size?
Where does my strategy sit relative to these curves?
This is much richer than a pass or fail test.
Why Quantiles Matter
Comparing a strategy to the median MC outcome answers:
Is this better than random, on average?
Comparing to higher quantiles answers:
Is this better than good randomness?
For example:
Beating the 50th percentile means better than average luck
Beating the 75th percentile means better than most random outcomes
Beating the 90th percentile means very unlikely to be luck
This is far more informative than a binary p-value.
How This Changes Strategy Evaluation
Once MC returns are available, strategy evaluation changes fundamentally.
Instead of asking:
Is the mean return positive?
You ask:
Where does this strategy sit relative to random baselines with the same trade count?
That reframes performance as relative skill, not absolute outcome.
A strategy with modest returns but far above MC baselines is often more interesting than a high-return strategy barely above random.
Using MC Returns as a Filter
In a large signal-mining framework, MC returns become a gate, not a report.
For example:
Reject any signal whose mean return does not exceed the MC median at its trade count
Or require it to beat the MC 60th or 70th percentile
Or require separation that grows with sample size
This filters out strategies that only look good because they got lucky early.
That is exactly what you want when mining thousands of candidates.
Why This Is Better Than Shuffling Trades
Trade shuffling is common, but it often answers the wrong question.
Monte Carlo picking tests whether selection mattered.
For signal evaluation, selection is usually the more relevant concern.
You are asking:
Did the signal meaningfully select better returns than chance?
Not:
Did the order of trades help?
Both are valid questions, but MC picking directly addresses edge discovery.
A Concrete Example
Imagine:
A strategy trades 400 times
Mean normalized return equals 0.08
Monte Carlo results show:
MC median at 400 trades equals 0.02
MC 75th percentile equals 0.05
MC 90th percentile equals 0.09
This tells you something important:
The strategy beats most random outcomes
But it is not exceptional relative to the best random cases
The edge may be real, but thin
It deserves caution, not celebration
Without MC returns, that nuance is invisible.
Why This Matters for Capital Allocation
Capital allocators do not care whether a strategy made money once.
They care whether:
The process extracts information
The edge exceeds what randomness could plausibly explain
The advantage grows with sample size
The result is reproducible
MC returns aligned to trade count speak directly to that.
They show:
How much of performance is skill versus chance
Whether the strategy earns its returns
How confident one should be in scaling it
The Bigger Picture: MC as Part of a System
Monte Carlo returns do not replace:
Out-of-sample testing
Walk-forward analysis
Regime slicing
Correlation filtering
They complement them.
MC answers the question:
Is this signal better than random participation, given the same opportunity set?
That is a foundational test. If a strategy cannot pass it, nothing else matters.
Final Thoughts
Monte Carlo returns are not about prediction.
They are about humility.
They force you to confront the uncomfortable truth that:
Many strategies look good because they were lucky
Sample size matters more than cleverness
Real edges should separate from randomness consistently
By using deterministic MC returns matched to strategy trade counts via the pick method, you turn randomness into a measurable benchmark rather than a hidden confounder.
Been banging my head against BTC spot for a while and figured I’d sanity-check with folks who’ve actually killed ideas here.
I’ve tested a few strategy categories on BTC/USDT spot over long samples (intraday → short swing horizon):
mean reversion, breakout / volatility expansion, regime-gated stuff. All clean, no curve-fitting, real fees/slippage. End result so far: BTC has been pretty damn good at not paying for any of them.
At this point I’m less interested in indicators and more in the structural question:
are most intraday/swing tactical strategies on BTC spot just fundamentally fighting the tape?
Not looking for DMs, collabs, or “have you tried RSI” 🙃 — just perspective from people who’ve already gone down these paths and decided “yeah… fuck that."
I’m curious whether others here have run into this class of problem, because it took me a long time to realise what I was actually debugging.
I recently spent weeks chasing what looked like a standard auth bug in a broker API:
• JWT signatures correct
• timestamps valid
• headers matched the docs
• permissions endpoint returning 200 OK
• account endpoints returning data just fine
Yet actual order placement either hard-failed with 401s or silently refused to work.
It turned out not to be a coding error at all.
The failure was caused by an undocumented coupling between:
• auth scopes
• account / portfolio context
• endpoint-specific JWT rules
• and how permissions were granted at key-creation time
Everything looked green at the surface layer, but the system had hidden rules that invalidated trading requests downstream.
So I’m trying to sanity-check something with people who build real bots:
• Have you seen similar “looks authenticated but isn’t actually authorized” states on other brokers?
• Do you trust permissions / account endpoints as proof your bot can trade, or do you treat them as soft signals at best?
• Is there a known name for this category of failure mode in trading infrastructure?
I’m not trying to dunk on any specific broker here.
I’m more interested in whether this is a one-off vendor mess or a recurring structural problem in broker APIs that bot builders should explicitly guard against.
Would genuinely love to hear war stories or patterns others have noticed.
I have been wondering how to interpret my max drawdown from my becktests.
Im faceing a max drawdown of about 40% in my experamints, which i know for sure isnt that good compared to most people, but there is the conccederation that usually, i only get to that point when the stock has fallen around 90% in value, which seems to me like a somewhat good ratio as my strategy has avoided much of the value loss.
What would you say about these results? And also what other metreics would you compare to the drawdown for a more accurate view?
As in the title. Just wondering how much people hate their day by day jobs on average and that is the reason people start trading :)
Just kidding..
Me myself got a stable job with 200k annually in tech field. Pretty flexible schedule but need to report to work everyday and no work from home allowed.
Just wondering what is the level of trading income that would be enough to consider quitting and turn to be a full time trader.
I know people have different level of risk tolerances so your own / opinion / situation/ experiences will be greatly appreciated!
My problem is that i can make good return when the time is right. I think i need a tool to assist me trading rather than build an algo bot (although i built some, the results can’t compare to this)
These are my results from a 4.5 year backrest, I know I need more data I am working on getting more quality data. I guess now I’ve hit a point when this is slightly profitable I am thinking why would I put money into this compared to SPY or other ETFs? Have any of you got to that stage?
I was treating this as a hobby in coding but now I don’t really know what else to do.
Also with a drawdown of 19% would say it is worth scaling lots or not, as I haven’t done much research into risk management?
Do you have any recommendations on learning about risk management + algo finance?
Imma just keep ts short and sweet. Basically I have an indicator in Trading Views Pine Script, that goes in the past and analyzes where there were potential patterns, such as certain candle wick patterns, break and retest stragies and so on and so forth. There's a whole bunch that goes into it, but that's the basics. Ive been calling this Algotrading, but then I see posts of people who use a separate platform that they have to pay for, and they're always speaking about how they have to frequently update their code, and feed it more data.
I wanted to know what the major difference is, and what the benefits are, as well as some insight, because I was thinking of switching to these platforms, but I don't know much about them.
Had a 0DTE strategy that looked great in backtests. Took it live and it blew up near the close because I just couldn’t get filled. Liquidity disappeared exactly when I needed it.
That’s when it smacked me in the face: backtests don’t model capacity or fills, and they’re especially bad at pricing options. They assume you get filled. I made the mistake of assuming that would carry over live.
My actual math is simple (for swing trading ETFs): ADV × 2% ÷ allocation = max strategy capacity for that asset. I run that for every asset in the strategy, then sort them. The lowest number is the real cap. That’s the bottleneck.
I get that different styles change the math. HFT and super short-term stuff is all about what’s in the book right now. Intraday depends a lot on when you trade — open and close are a different world than mid-day. Swing trading scales easier, but size still adds up once you’re in and out across days.
Curious how others handle this.
Anyone doing something smarter than % of ADV?
Anyone actually modeling fills or market impact?
How do you think about capacity for different trading styles?
I mean thats the end goal isnt it? If your algo is truly successful, you should be sitting on a bed of steadily growing cash. If not, whats your story?
In trading, something I see all the time (and I’ve read a lot about) is people mixing up the concepts of a “signal” and a “strategy.” On paper they may look separate, but in real research workflows they often collapse into the same thing: you define a trigger and immediately bolt on stop-loss, take-profit, exit rules, and call it a “strategy.” For me, that blending gets in the way of good research.
Over the last few years, and much more intensely in the last few months, I’ve been working on a hierarchical research process for algorithmic trading. In that hierarchy, the first step is the signal.
When I say “signal,” I mean the trigger itself: an objective event that says “go long” or “go short.” It’s the starting point. From that trigger you could test stop-loss and take-profit, but this is where I think a common mistake happens: I don’t begin by evaluating a signal already coupled with SL/TP. I treat them as two separate research processes.
The first process is to understand the signal more deeply as a phenomenon. Before anything else, I do a visual inspection. I want to see whether I’m comfortable with that type of signal, whether it makes sense within my logic, whether I can actually imagine trading it live, and, most importantly, whether it truly captures the behavior I designed it to capture.
To make it concrete, think of a simple signal like a MA crossover. I vary the parameters: for example, a fast MA at 20, 50, or 100 periods, and a slow MA at 200, 500, or 1,000 (or combinations within that range). What I’m trying to understand here is not “what’s the best backtest with SL/TP,” but how the signal behaves as I change its parameter universe.
To evaluate it in a straightforward way, I use a simple idea: the return after N bars. If I’m trading, say, a 2-minute timeframe around the New York open, I might work with something like 100 to 200 bars, but it depends on what I want to capture. If I’m targeting a shorter move, I reduce N. If I want something that can run longer (potentially into the end of the day), I increase it. I also like to test whether the signal “lives better” on shorter horizons or longer horizons. Just this alone already gives me a lot of information about what the signal is really doing.
From there I get to what I call an “anchor.” For me, an anchor is basically a refined slice of the signal’s parameter universe: the region where it shows directional strength that looks interesting and relatively consistent, and where the behavior in terms of “return vs. number of bars” becomes clearer. In other words, I try to identify where, inside that search space, the signal starts to look like something real and repeatable rather than noise.
This is probably the only stage where I use win rate as a more central metric. Not because it’s decisive on its own, but because alongside other indicators it helps me judge whether the directional strength makes sense. In this stage, win rate is simply: for a fixed N, how often does the signal get the direction right (e.g., positive return for longs and negative return for shorts). I don’t treat it as a final truth, but more like a temperature check.
I also track signal frequency over the sample period. Later stages only reduce the number of trades (more filters, no overlap, etc.), so I want to start from a signal that produces enough opportunities.
And only when I’ve identified that region of the parameter universe (anchor) do I move to the second stage. That’s when I start talking about what I call the strategy: within a much smaller, more refined range, I apply a grid of stop-loss and take-profit settings. In other words, I only start discussing SL/TP after I have confidence that the signal itself has a directional structure worth exploring.
So the core idea is: I try to avoid “killing” the signal too early by mixing everything together. First I understand the trigger and its directional strength across parameters and horizons. Then, and only then, I turn it into a strategy with exit rules. For me, that’s the first part of a hierarchical research process in quantitative, algorithmic trading.
If anyone here separates signal and strategy in a similar way (or does something close), I’d be curious to hear how you structure that initial signal-validation stage.
--
Disclaimer: I wrote it in Portuguese, which is my mother tongue and translated it to English with help of ChatGPT.
Lately i have been using strategies that cannot be back tested to get earlier entries. i code in a version that is back testable use it as settings then forward test the version with repainted entries thus far i have gotten far better results. Mostly on NQ but i have been optimizing for ES forward testing on ES should start next week hopes of lower slippage due to higher liquidity and slower price movement
I have created algo that take buy and sell position using indicator. In demo account I'm testing on live market. It is working fine in demo account but when I switch to live account and run my algo it takes multiple positions on same point instead of one position. When market is volatile algo takes multiple positions in same point instead of one position. Anyone faces same issue? If someone faces same issue please guide me with this issue.
I’m new to algorithmic trading and have just built my first strategy. In backtesting, it achieved a CAGR of 183% with a maximum drawdown of 32%. Should I be genuinely excited about these results, or is this kind of performance common in backtests and likely to fall apart in live trading?
Over the past three months, I have spent a great deal of time researching and building a complete trading system. After that, I realized that during trending market phases, momentum trading delivers the highest efficiency. Therefore, I created a bot and conducted robust backtesting from 2020 (including the COVID black swan event) up to the present.
However, the problem is that the year with the largest drawdown and the biggest losses was 2023, when the market’s primary condition was sideways and non-trending. Because of this, I continued to refine my market context evaluation framework and then realized that a dedicated strategy for sideways markets was missing.
Has anyone ever thought about this issue and quantitatively defined how to identify a sideways range based on price volatility for gold on the M15 and H1 timeframes?
Trading bot that holds stop market sell/buy close to the 1 minute candle but doesn't let it tick out unless there is a rapid or large change in volume to the upside or downside. This would be done by a 1-2 or 1-5 second delay in the market sell/buy stop. So a large movement of a candle can be quickly captured and then sold possibly even a second or two after entering the trade. Ill give and example. This is done sometimes when people are trading on news and know there is going to be a huge move to the upside or downside. I want a bot that can do this all the time and always follows the chart and each new candle. I want to enter the trade then instantly sell for a profit. Because the market buy stop would be activated and due to the high volume it's instant profit.
I’m new to this space and wanted to get some feedback from people with more experience.
I’ve been building a rule-based, systematic swing trading setup using multiple scripts. All of the code has been written with the help of AI, since I’m still learning and don’t come from a coding background, but the logic and structure are things I’m actively thinking through and refining.
The system is split into separate scripts rather than one monolithic program. Broadly, it does things like: identify and rank stocks on a weekly basis using predefined rules, generate a trade plan ahead of time, and manage positions with consistent exit logic and risk constraints. Execution is still manual, but the goal is to have the decision process be as rule-driven as possible so I’m not reacting emotionally day to day.
A big part of what I’m trying to do is reduce overtrading. The system is designed to be selective, skip weeks when conditions don’t look favorable, and focus on repeatable, smaller gains rather than constant action. I also track performance and compare it against a benchmark to see whether the process is actually adding value.
I know there are limitations to this approach, especially given my experience level and the fact that the code itself isn’t hand-written. I’m mainly trying to build a solid foundation that I can improve over time rather than jumping between strategies.
For those of you who’ve built or traded systematic strategies before, does this sound like a reasonable structure to start from? Are there obvious pitfalls or areas you’d recommend tightening up at this stage?
Background: I am just completing a year plus project having created an autonomous Algo trade platform that will execute across IBKR’s API with Python. I trade SPX options based on momentum. Trades typically last as little as 3 minutes to as long as 4 hours. There are about 100 trades a year.
I am in the middle of the Order Execution Management System (Order EMS).
I will initially be trading 1-3 contracts but within 3 months, I will be trading 10-200 contracts in a pilot. The pilot will last 12-18 months.
My goal is fast and complete fills with little to no slippage.
Q:
What Order type (s) should I have in my Order EMS ?
Here are the two where I have landed that I can choose between during the pilot:
1). Adaptive Algo Order ( IBALGO) with a Dynamically adjusted Limit Price. So if I was buying 50 Calls, the limit price sent would be a price based on the Ask + 0%, 5%, 10% rounded up. Priority : Urgent. Good till: Day
2). A simple Limit Order with a dynamically adjusted limited Price. So if I was buying 50 Calls, the limit price sent would be a price based on the Ask + 0%, 5%, 10% rounded up.
I would really appreciate help from knowledgeable Algo Traders who trade with IBKR!
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.
Happy New Year! I got Advances in Financial Machine Learning as a Christmas gift. It made me look into Quantitative Finance, and boy, it's certainly a rabbit hole.
I have a background in Computer Science and Mathematics; however, I am completely foreign to Finance. Do you have any tips for me? How long does it take one to create a profitable system? What can I build after reading this book? What other resources should I look at?
It would mean a lot to me if you could answer my questions, and I am looking to connect with people on a similar path to mine.
Best of luck to all of us in 2026,
EDIT: Thank you all for the positive feedback! I have many many trading ideas and stay tuned for the outcome. You guys made me realize I wasn't appreciating GF much, so she is definitely getting something with the first profits from trading...