Fin Maverick
Foundations VocabularyAccounting & ReportingEconomics & MacroQuant Methods & ProgrammingBusiness & Company AnalysisCorporate Finance & ValuationBehavioural Finance
Banking & Market InfrastructureFixed Income & RatesDerivatives & Structured ProductsPublic EquitiesTransactions & DealsPortfolio ConstructionFunds & AMCs
Private Markets & AlternativesRisk, Treasury & ControlAI & Digital FinanceStochastic Calculus & PricingWealth & Personal FinanceIndian Markets & RegulationProfessional Practice
CalculatorComparison
Frameworks
Explore Bootcamps
Equity ResearchPortfolio ManagementMutual Fund MasteryInvestment Banking Analyst
Private Equity AnalystQuant & Hedge Fund AnalystBreaking Into VCFinancial Analyst Program
Risk Management ProgramPrivate Wealth ManagementDebt Capital MarketsDerivatives Foundation
Explore Free Courses

Equity Research6

Writing an Investment ThesisBuilding a Discounted Cash FlowReading an Annual Report FastReading a Sector Before a CompanySpotting Quality of Earnings Red FlagsBuilding a Revenue Forecast From Drivers

Portfolio Management3

Rebalancing: When, Why and What It CostsStrategic and Tactical Asset AllocationMeasuring Risk in a Portfolio

Mutual Fund Mastery3

Comparing Funds Without Being FooledHow a NAV Is Struck and Which Day You GetReading a Fund Factsheet Properly

Derivatives Unlocked4

Hedging a Real ExposureThe Greeks, PracticallyFutures, the Basis and What Moves ItReading an Option Payoff

AI For Finance2

Retrieval and Grounding for FinanceDocument Extraction in Finance

Breaking Into Quants4

Backtesting a StrategyHypothesis TestingCleaning Financial DataRegression for Finance

Breaking Into VC3

Sizing a MarketReading a Term Sheet as a FounderHow a Venture Round Actually Works

Financial Analyst Program4

Common Size and Trend AnalysisReading a Cash Flow StatementRatio Analysis That Says SomethingBuilding a Working Capital Schedule

Risk Management Program2

Credit Exposure and How It Is ReducedValue at Risk and What It Hides

Investment Banking Analyst3

Precedent Transactions and Why They DifferReading a Term Sheet StructurallyBuilding a Comparable Companies Table

Private Wealth Management3

Tax Aware Portfolio DecisionsBuilding a Client Risk ProfileGoal Based Planning Arithmetic

Debt Capital Markets3

Analysing an Issuer's CreditDuration and What It Does Not Tell YouBond Pricing and Yield Mechanics

Private Equity Analyst2

Fund Waterfalls and CarryThe LBO in Structure

Hedge Funds Analyst2

Short Selling MechanicsLong Short Mechanics
QuarksCourses
Explore Interview Preparation
Investment BankingEquity ResearchVenture CapitalistPrivate EquityHedge Funds
QuantFinancial AnalysisPrivate Wealth ManagementDebt Capital MarketsRisk Management
Derivatives FoundationPortfolio ManagementMutual Fund Mastery
PartnershipsShowdown
Log inSign up
Interview tracksAll
1Investment Banking
Question bankPuzzlesCase studies
2Equity Research
Question bankPuzzlesCase studies
3Venture Capital
Question bankPuzzlesCase studies
4Private Equity
Question bankPuzzlesCase studies
5Hedge Funds
Question bankPuzzlesCase studies
6Quant
Question bankPuzzlesCase studies
7Financial Analysis
Question bankPuzzlesCase studies
8Private Wealth Management
Question bankPuzzlesCase studies
9Debt Capital Markets
Question bankPuzzlesCase studies
10Risk Management
Question bankPuzzlesCase studies
11Derivatives Foundation
Question bankPuzzlesCase studies
12Portfolio Management
Question bankPuzzlesCase studies
13Mutual Fund Mastery
Question bankPuzzlesCase studies
092

Case 092Strategy evaluation and backtestsWarm up

Kadvari's signal uses each day's closing price to trigger a trade executed at that same close. Re-run with execution at the next open and the annual return falls from 15% to 4%. Where did the 11 points go, and how do you fix the timing?

1The situation

Kadvari Quant's junior researcher has a breakout signal: when a stock closes above its 20-day high, buy; sell when the close falls back below a trailing level. The backtest computes the signal from each day's closing price and fills the trade at that same closing price. It shows 15% a year from about 50 trades.

A reviewer changes one line so trades fill at the next day's open, and the return drops to 4%. The researcher thinks the open is a noisy price and wants to keep the close. You are asked to settle it.

2Your task

Explain where the 11 points went, show it with a three-day example, and say how to set the timing correctly.

Quick check

Why is filling at the same close the signal uses a problem?

Worked solution

Try it on paper, then open one step at a time.

30-second answerThe answer to give first

The 11 points are look-ahead: the backtest buys at the very close that triggered the signal, a price no order could have reached, and pockets the move from that close to the next open. Over 50 trades the overnight gap at entry is worth about 12.5 points, partly given back at exit. Fix the timing by trading at the next open, or by computing the signal from a price before the close and testing a fill in the closing auction, then add costs.

Step 1Why can't the backtest trade at the close it uses?

Imagine betting on a cricket match with a bookmaker who accepts the bet after the last ball. Anyone could win that way, and no bookmaker allows it. A closing price is known only when trading has finished, so a signal that needs the close cannot also be executed at the close. This is a look-ahead error, and it is easy to make because in a daily data file the close and the signal sit on the same row, one column apart. The backtest is, in effect, placing the order after seeing the result.

Step 2Where did the 11 points go?

Follow one typical trade. On Day 1 the stock closes at 100.00, above its 20-day high, and the signal fires. The backtest buys at 100.00. A live system learns of the signal after the close and buys at Day 2's open, 100.25. On Day 2 the close of 100.30 triggers the exit; the backtest sells there, the live system at Day 3's open, 100.33. The backtest earns 0.30%, the live trade 0.08%: the 0.25 move overnight after the signal is exactly the part of the trade no one could have caught. It is not random either: a strong close that breaks a 20-day high tends to be followed by a higher open, because other traders read the same close overnight.

The signal needs the close, so it cannot also trade at the close100.00100.10100.20100.30leaked: +0.25 overnightDay 1 close100.00signal firesbacktest buysDay 2 open100.25live buysDay 2 close100.30exit signalbacktest sellsDay 3 open100.33live sellsBacktest: 100.00 to 100.30 = 0.30%. Live: 100.25 to 100.33 = 0.08%.
In one Kadvari trade the backtest buys at the Day 1 close of 100.00 that fired the signal and earns 0.30%, while a live system can only buy at the next open of 100.25 and earns 0.08%, the overnight 0.25 being the leaked move.

Scale it up. With 50 trades a year, entry at the next open costs 50 x 0.25 = 12.5 points, and exiting at the next open instead of the close happens to give back 1.5, because the drift continues a little after the exit signal too. Net, 15% becomes 4%: most of the backtest's return was the overnight move the signal could not have traded.

The relationship
Rlive=Rbt−n gˉentry+n gˉexit=15−50(0.25)+50(0.03)=4%R_{\text{live}} = R_{\text{bt}} - n\,\bar{g}_{\text{entry}} + n\,\bar{g}_{\text{exit}} = 15 - 50(0.25) + 50(0.03) = 4\%
R btbacktest return a year, filled at the signal close, 15%
ntrades a year, 50
g entry, g exitaverage move from the signal close to the next open at entry, 0.25%, and at exit, 0.03%
What it says in wordsThe live return is the backtest return minus the overnight moves missed at entry plus those gained at exit, summed over the year's trades.
Where the 11 points went, over 50 trades a yearBacktest, trade at the close15.0%Entry: miss the overnight gap-12.5Exit: sell at next open+1.5Live, trade at the next open4.0%Percentage points a year, simple sum of 50 trades, before costs
Over 50 trades, missing the overnight gap at entry costs Kadvari 12.5 points a year and exiting at the next open gives back 1.5, so the backtest's 15% becomes 4% before costs.
Step 3How do you fix the timing?

There are two honest designs. Either compute the signal at the close and trade at the next open, which is what the reviewer did, or compute it from a price available before the close, say 20 minutes earlier, and test a fill in the closing auction at the real closing price. The second keeps more of the overnight move but changes the signal, since the early price is not the close, so it must be backtested as its own strategy. Either way, add trading costs, which for a 4% strategy with 50 round trips a year are a large share of what remains. Then sweep the rest of the code for the same mistake: adjusted prices that use later corporate actions, index membership as of today, and fundamentals stamped with their period end rather than their release date.

Where candidates lose it

The usual loss is defending the close as the 'cleaner' price and calling the open noisy. Noise is not the issue; availability is. A price you cannot trade at is not a price at all for a backtest.

The second is treating 4% as a disappointment caused by the reviewer. The 4% is the strategy; the 15% never existed. Reporting the honest figure early is what a research desk wants from a junior.

What the interviewer asks next

  • How would you test whether the strategy can still capture part of the overnight move?
  • What other look-ahead errors are common in daily backtests?
  • How would trading costs of 10 basis points a side change the 4%?
  • Why might a mean-reversion signal show the opposite gap at the open?
← Case 091A company's five-year CDS trades at 300 bps while its bond trades 360 bps over the swap curve. How do you construct the basis trade, what does it carry, and what can make it lose?Case 093 →Analyse a pairs trade in Varnika Paints and Chitrangi Coatings: hedge ratio 1.2, spread z-score 2.3, half-life 12 days, spread standard deviation Rs 8. What are the expected profit, the holding time and a stop level, and what would break the relationship?

Company names and figures are illustrative.

Fin Maverick Free CoursesExplore Free Courses
Fin Maverick BootcampsExplore Bootcamps
Fin Maverick

Finance education that ends in a job, not a certificate that gathers dust. Built for young India.

LEARN
CalculatorsFrameworksComparisonsInterview RoadmapsShowdown
RESOURCES
All CoursesFree CoursesBootcampsInternships
COMPANY
AboutJob openingPartnership
LEGAL
Privacy PolicyTerms & ConditionsContent LicenseReturn & Refund Policy
© 2026 FIN MAVERICK / BUILT FOR INDIA.DO FINANCE, DO NOT JUST READ ABOUT IT.