NiveshBuddy Learn
Examples & Case StudiesBeginner

From Idea to Simulation: An End-to-End Journey

One fictional investor takes a broad idea all the way to a running simulation: turning it into rules, reading the backtest, starting a simulation, handling its first scheduled trades, recording a real fill, and then deciding for herself what to do with real money.

6 min readUpdated

What You’ll Learn

By the end of this article, you’ll understand:

  • How a broad investing idea becomes a set of rules you can test
  • What to read in a backtest before moving on
  • What happens in a simulation's first weeks, and the one decision its trades ask of you
  • How to keep a simulation matching what you actually did
  • Why the last step, acting with real money, stays your own decision

An illustrative journey

Asha and her strategy are fictional, and so is every figure in this story: they are round numbers chosen to show the method, not results anyone achieved. The screens are real NiveshBuddy screens, captured from demo data. Nothing here is a recommendation to buy, sell or hold anything.

Objective

Asha has an idea most investors would recognise: I'd like to own large, established companies, but lean towards the ones that have been doing well lately, and not hold on to the ones that stop. She doesn't want to pick stocks one by one, and she doesn't want to act on a hunch.

Her objective is narrower than "find a winning strategy". She wants to turn the idea into rules, see how those rules behaved in the past, watch them work in the present without risking money, and only then decide, on her own, what to do.

Approach

Asha's journey

  1. An ideaLarge companies, leaning to recent strength
  2. RulesBuilt as a Quick strategy
  3. BacktestRead the risk before the return
  4. SimulationThe same rules, forward, with virtual money
  5. Scheduled tradesFriday's signal, Monday's close
  6. One rejectionWith a reason she writes down
  7. Record a real fillEdit Position, after her broker trade
  8. Her decisionWhat to do with real money is hers
Eight steps, each one a decision, not a result.

Strategy design

Asha starts with the Quick Strategy builder, because her idea is a style rather than a set of specific indicators. Three choices carry it:

  • Risk Level: Balanced. Not the most defensive option, because she does want growth, but not the most aggressive either.
  • Strategy Speed: Moderate. Her idea is about lasting strength, not week-to-week swings.
  • Rebalance Frequency: Weekly. She wants the strategy to drop a fading stock reasonably soon. A weekly Quick strategy rebalances on Monday.
The Rebalance Frequency dropdown open, listing Daily — Capture short-term market movements, Weekly — Stay aligned with changing market trends, Fortnightly — Balance between agility and stability, and Monthly — Focus on long-term trends with fewer trades, with Monthly currently ticked
Asha picks Weekly, the second option

The builder turns those three choices into a full rule set: a universe, filters, ranking and exit rules. Before she runs the backtest, she reads the review dialog to check that the rules say what she meant.

Review of outcome

The backtest

Her backtest runs over the history her plan allows. Suppose, for the story, that it grew at about 13% a year, with a worst fall of about 25% along the way and a Score in the high 60s.

What Asha reads first is not the 13%. It is the 25%: could I have sat through a quarter of my money disappearing, on paper, for months? Then she reads the Key takeaway and its caveats, and checks how the strategy did in the weak stretches, not only overall. She decides she could live with it, and that the backtest has told her as much as a backtest can.

Starting the simulation

From the strategy's results page, she presses Start Simulation, names it, keeps the default ₹10,00,000 of virtual Starting Capital, and accepts the earliest start date offered.

The Start New Simulation dialog, with Simulation Name, Starting Capital ₹1000000 and Simulation Start Date fields, a note that rebalances follow the strategy automatically and that executions can be reconciled on any open holding, and Cancel and Start Simulation buttons
The real dialog, shown here for a demo strategy

Nothing is bought at that moment. The simulation's first batch of trades buys every holding the strategy targets, at the start date's close.

The first scheduled trades

From then on, every Monday is a rebalance. On a Friday evening, after the day's market data is in, the strategy re-ranks its universe. If anything has changed, the simulation lists the trades it wants to make as Scheduled Trades, each with a reason: a buy because a stock now ranks highly, a sell because a holding has slipped past its exit rank or no longer passes the strategy's filters.

The Scheduled Trades section of a demo simulation: 7 Buy, 6 Sell, Review by a date, a banner reading Runs automatically at close, and rows showing buys with their rank and sells with stop-loss and moving-average reasons, each with a Reject button
A demo simulation's batch, shown to illustrate the screen

The trades run on their own at Monday's close. Asha doesn't have to approve them, and in most weeks she simply lets them run.

Rejecting one

One week, a buy appears for a company she knows is in the middle of a dispute she isn't comfortable with. The rules can't know that; she can. She presses Reject, and writes herself a note: the date, the stock, and why.

A Rejected list holding one trade, marked Rejected, with a Reset button beside it
Rejected, with Reset available until the trade would have run

She knows what that costs. From now on, the simulation shows her rules plus one judgment of hers, so it is no longer a pure test of the rules. She keeps rejections rare for exactly that reason.

Recording a different real fill

Asha decides to follow part of the strategy with real money, at her own broker. When she buys one of the simulation's holdings, her broker fills the order a little above the simulated closing price.

So she opens the holding on Active Portfolio and uses Edit Position to record her real average price. The simulation now matches what she actually owns, and its cash moves by the difference.

The Edit Position dialog for a holding of 301 shares, with Avg Price corrected from ₹219.3 to ₹219.85, a note quoting the broker contract note, and a summary showing the cash effect of −₹165.55
The real dialog, shown with a demo correction

Monitoring over several rebalances

For the first month, the simulation's Key takeaway tells her what she needs to hear:

A Key takeaway card reading Too early to judge, with the note 3 days of history so far; the takeaway appears after 30 days
Early results are noise, and the screen says so

So she watches the behaviour instead of the number. Over several Mondays she checks how often it trades, whether its sells happen for the reasons she expected, and whether its swings are in the range the backtest showed. Where something surprises her, she opens Logs to see why.

Trade-offs

Rejecting vs following the rules

Each rejection uses something the rules can't see, and makes the record a little less a test of the rules. Rare and written down is the balance Asha chose.

A faithful record vs a clean one

Recording real fills makes the simulation match her portfolio, at the cost of it no longer being the strategy alone. Which matters more depends on what she uses it for.

Patience vs early judgment

A few weeks of results say almost nothing. Waiting several rebalances before judging is slow, and it is the only way the simulation can tell her more than the backtest did.

Lessons learned

  • Start from an idea you can state in a sentence, and choose rules that say the same thing.
  • Read a backtest's risk before its return, and decide whether you could have lived through its worst stretch.
  • A simulation is the same rules, forward, with virtual money; its first batch is all buys, and later batches only what changed.
  • Scheduled trades run on their own at the close; rejecting is the one decision, and worth keeping rare and noted.
  • If you act at a broker, record your real fills so the simulation keeps matching what you own.
  • Judge a simulation over several rebalances, not its first weeks, and remember that how you implement anything with real money is your decision alone.