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 MasteryFinancial LiteracyInvestment Banking Analyst
Private Equity AnalystHedge Funds AnalystBreaking Into VCBreaking Into QuantsAI For Finance
Financial Analyst ProgramRisk Management ProgramPrivate Wealth ManagementDebt Capital MarketsDerivatives Foundation
Explore Internships
Equity Research InternMutual Fund Intern
Portfolio Management InternFinancial Literacy Intern
Explore Micro 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
Courses
Explore Career Roadmaps
Investment Banking AnalystEquity Research AnalystVC AnalystPrivate Equity AnalystHedge Funds Analyst
Quant AnalystAI For FinanceFinancial Analyst ProgramPrivate Wealth ManagementDebt Capital Markets
Risk Management ProgramDerivatives FoundationPortfolio ManagementMutual Fund Mastery
PartnershipsShowdown
Log inSign up
Quant Analyst · CoreTrack
1Quantitative Methods, Financial Data & Programming
iProbability
Probability in FinanceRandom VariableProbability DistributionsThe Normal DistributionNormal Distribution ProbabilityThe Lognormal DistributionRandomness vs Uncertainty
iiStatistics and Inference
Population and SampleMean, Median and ModePrecision and AccuracyVariable TypesVariance, Standard Deviation and…Dispersion MeasuresStatistical BiasEffect SizeHypothesis TestingThe Sampling DistributionSkewnessKurtosisCovarianceConfidence IntervalArithmetic Mean vs Geometric MeanStatistical Significance vs Economic…Confidence Interval vs Prediction IntervalHow to Summarise a…
iiiCorrelation and Regression
RegressionCorrelation and CausationOrdinary Least SquaresInteraction TermsRegression CoefficientsRegression vs ClassificationHow to Build a…Spurious CorrelationRegression, Correlation and FitResidualsMulticollinearityAutocorrelation and Partial Autocorrelation
ivTime Series
Time Series in FinanceSimple, Weighted and Exponential…Moving Average CalculatorPrice, Return and Level SeriesHow to Prepare Time-Series…LagFrequencySeasonalityTimestampsTrendStationarity and the Unit RootHeteroskedasticityLeadRolling WindowsDifferencing
vSimulation and Numerical Methods
SimulationMonte Carlo SimulationHow to Run a…Numerical MethodsIterationResampling and the BootstrapPseudorandom Numbers and the SeedConvergence and ToleranceNumerical Stability
viOptimisation
OptimisationLocal and Global OptimaConstraintsConvex OptimisationThe SolverLinear ProgrammingThe Objective FunctionConstraint ViolationThe Feasible SetLagrange MultipliersQuadratic Programming
viiModelling Practice
Linear, Logistic, Ridge and…Training, Validation and Test…The ModelModel ErrorDependent and Independent VariablesThe ROC Curve and AUCWhat a Model HoldsMSE, RMSE, MAE and MAPEPrecision and RecallCross Validation and RegularisationOverfitting and UnderfittingReturn Series MeasuresSimple, Compound and Log Return
viiiBacktesting and Research Integrity
BacktestingBacktest vs Live PerformanceHow to Document a…How to Prevent Backtest…Out-of-Sample TestingWalk-Forward AnalysisMultiple TestingP-HackingData Snooping
ixData Quality and Structure
Data QualityThe DatasetSelection and Survivorship BiasVersioned DatasetsData Structures in FinanceData CleaningMissing Data and Null ValuesStructured Data vs Unstructured DataMissing Data vs ZeroData Validation vs Data CleaningOutliersDuplicate Records
xProgramming for Finance
Data PipelinesAPIs for Financial DataAPI vs CSV FileDatabases in FinancePython for FinanceJoinsSQL for FinanceThe Analysis Workflow
xiQuantitative Research
Research DesignThe Data Generating ProcessReproducibilityPeer Review in Analytical WorkThe Research HypothesisRobustness and Sensitivity
2Stochastic Calculus & Derivative Pricing Theory
iProbability Foundations
The Probability SpaceRandom VectorsSigma-AlgebraExpectationSample Space and EventsDensity and Distribution FunctionsRisk-Neutral ProbabilityState Price Density vs…
iiStochastic Processes and Jumps
Properties of a Stochastic ProcessMartingaleBrownian Motion and Its PropertiesBrownian Motion vs Geometric…Stopping TimeThe Markov PropertyState VariablesTransition ProbabilityQuadratic VariationQuadratic Variation vs Ordinary…Submartingale and SupermartingaleMartingale RepresentationMarkov Process vs MartingaleOptional StoppingFiltrationJump ProcessesThe Poisson ProcessLevy ProcessesJump Diffusion
iiiIto Calculus
The Ito IntegralThe Ito Integral vs the Riemann IntegralInfinitesimals in Stochastic CalculusQuadratic CovariationIto's LemmaHow to Apply Ito's…The Infinitesimal GeneratorIto Calculus vs Ordinary Calculus
ivStochastic Differential Equations
Stochastic Differential EquationsStochastic Differential Equation vs…Drift and DiffusionStrong and Weak Solutions ComparedDiscretisationGeometric Brownian Motion
vPricing Theory and No-Arbitrage
No-ArbitrageGirsanov, Radon-Nikodym and Change…Physical and Risk-Neutral Measures…The Fundamental Theorems of…The Law of One PriceThe Pricing KernelDiscount Factors and Zero-Coupon PricesReplication vs HedgingComplete Market vs Incomplete MarketClearing Margin Architecture
viOption Pricing Theory
European and American OptionsMonte Carlo European OptionThe Black-Scholes PDEBlack Scholes and the GreeksThe Payoff FunctionThe Binomial ModelBinomial Option PricingDelta Hedging in TheoryBoundary, Initial and Terminal ConditionsThe Exercise BoundaryHow to Check Put-Call…
viiVolatility Models
Constant, Local and Stochastic…Vasicek Model vs CIR ModelThe Heston ModelThe SABR ModelThe Volatility ProcessImplied VolatilityVolatility Smile vs Skew vs Surface
viiiInterest Rate Models
Interest-Rate DerivativesMean ReversionThe Zero-Coupon BondThe Ornstein-Uhlenbeck ProcessThe Discount CurveZero RatesShort-Rate Model vs Market Model
ixNumerical Pricing
Closed Form and Numerical…Monte Carlo PricingEuler and Milstein Schemes ComparedTree MethodsFinite Difference MethodsNumerical Error and StabilityVariance Reduction
xCalibration and Model Risk
Model OverrideMarket Price and Model PriceCalibrationHow to Document a Pricing ModelThe Educational Illustration LabelMarket ConventionsModel Uncertainty and LimitationsBacktesting a Pricing ModelIdentifiabilityCalibrated ParametersThe Calibration Loss Function

Data Validation vs Data Cleaning: Finding Against Fixing

Validation is a sentence written before the record arrives, saying what a cell may contain. Running it raises flags and changes nothing. Cleaning is a change somebody decided on and wrote down. On the Neelbagh stall record, invented, six rules raise seven flags and move no figure at all. Three of the nine faults raise no flag anywhere.

A rule is a sentence somebody sat down and wrote, in ordinary words, about what a cell in a particular column is allowed to hold. Writing one takes no test, no fitted line and no statistic of any kind. Where a rule carries a cutoff, a person picks the number rather than working it out from a spread. Two things are taken as given below rather than rebuilt from scratch. The first is the written column listThe short document that says, column by column, what a record holds and in what form. The people who keep the record write it down, and the list sets out the form the record is supposed to take rather than the form it happens to take. for this record, which says what each of the eight columns holds. The second is the run that put the record right afterwards, whose net effect on the average takings figure appears once below as a contrast.

What is validation, and what does running it change?

Validation is checking a record against sentences written in advance. Somebody decides, before a single row arrives, what a cell in each column may and may not contain. The takings column holds whole rupees and is never empty. The pitch column holds an area in square feet somewhere between a stall big enough to stand in and a stall big enough to park a van in. Then the record turns up, the sentences are run over it, and every cell that breaks one gets a mark against it. The mark against a cell is called a flag. Running a set of rules produces a list of flags and nothing else at all: the record afterwards is byte for byte the record that was handed over.

The school exam hall on the day the answer sheets come back from the invigilator has the same shape. Before anybody grades anything, one clerk goes down the pile checking that each sheet has a roll number written on it, that no roll number appears twice, and that no sheet is blank. She puts a slip of paper in the ones that fail. She does not write a roll number on the blank sheet. She does not choose between two sheets with the same number. At the end of an hour the pile is exactly as heavy as it was, carries exactly the same marks on the sheets, and now holds eleven slips. Validation is complete at that point, and everything difficult still lies ahead of it.

What is cleaning, and what does doing it change?

Cleaning is the other half, and it is the half where something actually happens to the record. Somebody reads the flags, decides what each one deserves, makes the change and writes down what was changed and why. The order matters inside that sentence: a decision comes between the flag and the change, and the decision belongs to a person who can be named afterwards. Validation says a cell cannot be right; cleaning says what was done about it, signed.

How the cleaning is done and what each step costs is covered separately. The size of the difference between the two acts is easy to state on this record. The run that put this record right moved the average takings figure down by Rs 14,838.90/-, from Rs 69,035.45/- to Rs 54,196.55/-, both figures on one convention, stated here so that it can be checked: every takings cell that holds a usable number is added up, and the total is divided by the count of those cells. An empty cell holds no number. The office code meaning no return arrived holds no number either. A genuine zero does hold one, and it counts. The two averages come from Rs 21,40,099/- over the 31 takings cells that carried a number and Rs 15,71,700/- over the 29 that carried a usable one, each division rounded once at the end. Against that, the six rules below move the same figure by exactly nothing. Moving figures is not what rules do.

TWO ACTS, TWO MOMENTS, TWO PEOPLE The same four questions asked of each, on the Neelbagh stall record. VALIDATION CLEANING WHEN IT HAPPENS Before the record arrives. The sentence is written first, on paper. Afterwards, and only once somebody has read the flags and decided. WHAT IT PRODUCES A list of flags. Seven of them on this record, from six rules. A changed record, and a line saying what changed, why, and who said so. WHAT IT CHANGES IN THE RECORD Nothing. Not one cell. Every figure stands where it stood. Down Rs 14,838.90/- on the takings figure for this record. WHO IS ACCOUNTABLE Whoever wrote the sentence, before any of this data existed. Whoever signed the change, named on the line beside it. Confusing the two is not a vocabulary slip. It is how cells get altered with nobody deciding to alter them.
Validation is written in advance, produces flags and changes nothing at all; cleaning happens afterwards, produces changes and must be written down beside the name of whoever signed them.
Try it out

Validation and cleaning differ most obviously in what each one produces. Which pairing is right?

Where does a rule come from, if not from the data?

Where a rule comes from separates a rule set worth running from one that is theatre, and the answer is short. Every rule worth having is a line of the written column list turned around into a claim about the file at hand. The list says the takings column holds a whole number of rupees and is never left empty; turned around, that is a rule saying this cell is not empty. The list says Rs 99,999/- is what the market office writes on the form when a stall never sent its return in; turned around, that is a rule saying a takings figure is not that no return codeA fixed value an office writes into a cell to mean something other than a quantity, here to mean the paperwork never arrived. A code of that kind looks like money and is not money, and only the column list says which values are codes.. The list says one row covers one stall for one month. The stall and the month together are the file's keyThe combination of columns that is supposed to pick out exactly one row. Here it is the stall and the month together, so two rows carrying the same stall and the same month are two rows too many.; turned around, that is a rule saying no two rows share a stall and a month.

Now the failure. Somebody working at speed writes rules by looking at the file: the smallest figure in the takings column is Rs 0/-, the largest is Rs 4,80,000/-, so the rule becomes takings between Rs 0/- and Rs 4,80,000/-. The rule will pass every row, every time, for ever. A sentence like that was never a rule at all, but a description of the file wearing a rule's clothes, and a description approves whatever it describes, faults included. A rule that came out of the data is not a rule, and it will approve the record's faults with the same untroubled confidence it approves everything else. The test is simple and it is about time rather than content: could this sentence have been written before the file existed? If not, it has nothing independent to say.

WHICH WAY THE ARROW RUNS A rule may be made out of the column list. It may never be made out of the file. ONE LINE OF THE WRITTEN COLUMN LIST takings_rupees holds a whole number of rupees and is never left empty. turned around A RULE, AND IT IS ALLOWED TO BE ONE This takings cell is not empty. Writable before the file existed. NOT A RULE. A DESCRIPTION. takings between Rs 0/- and Rs 4,80,000/-. Passes every row. never this way THE FILE AS IT HAPPENS TO BE Smallest figure in the column Rs 0/-. Largest figure Rs 4,80,000/-. The one question that settles it: could this sentence have been written before the file existed? If it could not, it is a description, and it will approve every fault the file already carries.
A rule made out of the data is a description rather than a rule, and it will approve whatever the file happens to contain, including the faults already sitting in it.
Try it out

Somebody proposes a rule that flags any takings figure outside the range the record already contains. What is wrong with it?

Breaking Into Quants Bootcamp — Fin Maverick

What do six rules actually catch on this record?

Here is the whole rule set, six sentences, every one of them a line of the written column list turned around. One: a takings cell is not empty. Two: no two rows carry the same stall and the same month. Three: every stall in the grid has a row for every month. Four: a takings figure is not the market office code for no return received. Five: a takings figure is not more than five times that stall's own smallest other month above nothing. Six: a pitch is between 50 and 200 square feet.

Rule five deserves a sentence of explanation because it is the only one carrying a number that is not straight off the column list. The five is a thresholdA fixed cutoff written into a rule, on one side of which a value is let through and on the other side of which it is marked. Somebody chooses the number and can be asked why they chose it., and it was chosen by a person at the market office who thought about how much a stall's month can plausibly jump and wrote down five. The five is not worked out from anything. Four or eight would have been just as defensible, and a different choice would have raised a different set of flags. The number therefore sits in the sentence where anybody can argue with it, rather than buried in a machine.

The six rules run over the record produce seven flags. Six sentences, seven flags, and afterwards every one of the thirty two rows holds exactly the figure it held before the run started. Rule one lands on NB-05 Bansi Flour's month 2, where a row exists and the takings cell is empty. Rule two lands on NB-03 Harit Greens' month 2, filed twice: once on day 5 reading Rs 36,400/- and once on day 19 reading Rs 39,700/-. Rule three lands on NB-04 Peetal Utensils' month 3, a month with no row at all. Rule four lands on NB-02 Chandan Tea's month 4, reading Rs 99,999/-. Rule five lands twice, on NB-07 Sundari Chaat's month 3 and NB-08 Peeli Mithai's month 3, both of which read Rs 4,80,000/-. Rule six lands on NB-05 Bansi Flour's pitch, recorded as 14 in a column that holds square feet.

SIX RULES RUN OVER THE RECORD. SEVEN CHIPS. NOTHING MOVED. The Neelbagh stall record as handed over, invented. A red chip is a flag, and a flag is a mark and not an edit. stall month 1 month 2 month 3 month 4 pitch NB-01 Kadamba Idli Rs 42,000/- Rs 44,000/- Rs 43,000/- Rs 45,000/- 120 NB-02 Chandan Tea Rs 31,000/- Rs 33,000/- Rs 32,000/- Rs 99,999/- R4 60 NB-03 Harit Greens Rs 38,000/- Rs 36,400/- R2 Rs 39,700/- Rs 41,000/- Rs 40,000/- 100 NB-04 Peetal Utensils Rs 26,000/- Rs 0/- no row at all R3 Rs 28,000/- 80 NB-05 Bansi Flour Rs 55,000/- left empty R1 Rs 54,000/- Rs 53,000/- 14 R6 NB-06 Ilaka Fruit Rs 34,000/- Rs 36,000/- Rs 35,000/- Rs 37,000/- 100 NB-07 Sundari Chaat Rs 40,000/- Rs 41,000/- Rs 4,80,000/- R5 Rs 42,000/- 90 NB-08 Peeli Mithai Rs 42,000/- Rs 45,000/- Rs 4,80,000/- R5 Rs 47,000/- 110 THE SIX SENTENCES, AND WHERE EACH CHIP LANDED R1 a takings cell is not empty R2 no two rows share a stall and a month R3 every stall has a row for every month R4 a takings figure is not the office code R5 not above five times the smallest other month R6 a pitch is between 50 and 200 square feet Seven chips. Thirty two rows. Not one figure in this grid is different from the one the office handed over.
Six rules raise seven flags on the Neelbagh stall record, and not one of the thirty two rows holds a different figure afterwards from the one it held before.
RuleThe sentence, and the line of the column list it came fromWhat it flagged
R1A takings cell is not empty. The list says the column holds a whole number of rupees.NB-05 month 2
R2No two rows share a stall and a month. The list says one row covers one stall for one month.NB-03 month 2
R3Every stall has a row for every month. Same line of the list, read the other way round.NB-04 month 3
R4A takings figure is not Rs 99,999/-. The list says that value is the office code for no return received.NB-02 month 4
R5A takings figure is not above five times that stall's own smallest other month above nothing. The five was chosen by a person.NB-07 month 3
NB-08 month 3
R6A pitch is between 50 and 200 square feet. The list says the column holds an area in square feet.NB-05, the pitch
6Rules run, in the order written, over all thirty two rows7 flags, 0 figures moved
Try it out

Six rules have just raised seven flags on this record. How many figures in the record have changed?

Why does the code for no return walk past the size rule?

Rule four and rule five look at the same column and feel like they overlap. The two rules do not overlap, and this record shows why in one figure. NB-02 Chandan Tea's month 4 reads Rs 99,999/-, not money at all but the office code meaning the return never arrived. Rule four catches it because rule four knows the code. Now ask whether rule five would have caught it as well, if rule four had never been written. NB-02's other three months are Rs 31,000/-, Rs 33,000/- and Rs 32,000/-. The smallest is Rs 31,000/-, and five times Rs 31,000/- is Rs 1,55,000/-. Rs 99,999/- sits comfortably below that. Next to that stall's own months a figure of Rs 99,999/- is unremarkable, so the size rule lets the code straight through.

The general shape is worth holding on to. A size rule knows nothing except how big things are. A dictionary rule knows what particular values mean in this office. Neither substitutes for the other, and a rule set with only one kind has a hole in it shaped exactly like the other kind. The everyday version: a bank statement line reading Rs 1/- might be a real one rupee test transfer or might be the code the branch uses for something else entirely, and no amount of staring at how big it is will settle which.

A SIZE RULE AND A DICTIONARY RULE ARE NOT THE SAME TOOL One rupee scale, NB-02 Chandan Tea's month 4, and the two rules that might have caught it. RULE FIVE, A SIZE RULE the flagged region Rs 0/- Rs 2,00,000/- its three other months Rs 31,000/- to Rs 33,000/- five times Rs 31,000/- is Rs 1,55,000/- Rs 99,999/-, the office code below the line, so rule five says nothing RULE FOUR, A DICTIONARY RULE one exact value, and it is this one Rs 99,999/- is the code for no return received. Flagged. A size rule knows only how big a figure is. A dictionary rule knows what a particular value means in this office.
Rule five never reaches the office code because Rs 99,999/- looks ordinary beside that stall's own months, and only a rule that knows the code catches it.
Try it out

Suppose rule four had never been written. Would rule five, the size rule, have caught NB-02 Chandan Tea's Rs 99,999/-?

Try it out

The control below switches the six rules on one at a time, and the flags pile up as it goes. Nine faults were put into this record on purpose. The question is whether the count of faults carrying no flag falls to nothing by the time all six rules are running.

Play with it

Switch the rules on one at a time, and watch what the flags never reach.

A single control here does the one useful thing anybody can do to a rule set, adding one more rule. Drag it and the sentences light up in the order they were written, chips appear on the cells they catch, and the two bars on the right move against each other. There is also a button for rule five as it was first written, before anybody noticed what it did to a stall that took nothing. The panel opens with all six rules running in their repaired form, exactly the reading printed in the table above.

no rules at all6 of 6 rules switched onthe whole set
Rules switched on
6
Flags raised
7
Faults with no flag
3 of 9
Out of reach of every rule
3
Educational illustration. The six rules are the six stated above and each one came out of the written column list; the five in rule five was chosen by a person rather than computed from the record. Rule five is shown repaired unless the button is pressed, and no setting of this control alters a single figure in the grid below.
AI For Finance Bootcamp — Fin Maverick

What happened when one of those rules was written badly?

The most useful fact about rule five was not found by reading the rule. Somebody found it by running the rule and counting what came back. Rule five was first written without three words at the end. The sentence said a takings figure is not above five times that stall's own smallest other month, and it stopped there. Run over the record it raised nine flags rather than seven.

The two extra flags both landed on NB-04 Peetal Utensils. NB-04 really did take nothing at all in month 2. A recorded zero is not a fault and not a missing value but a correct figure, and a real zero is money in exactly the way a blank is not. So NB-04's smallest other month was Rs 0/-, and five times nothing is nothing. Every figure NB-04 ever recorded is above nothing. Its month 1 of Rs 26,000/- and its month 4 of Rs 28,000/-, two entirely ordinary months for a small utensils stall, both got flagged. Two false positivesA mark raised against something that turns out to be perfectly fine. The mark is real, the thing it is pointing at is not, and the cost is the time somebody spends looking., caused not by a wrong figure but by a right one.

Repair the sentence by adding the words above nothing and the rule takes NB-04's smallest other month as Rs 26,000/- instead. Five times Rs 26,000/- is Rs 1,30,000/-. Nothing of NB-04's comes near that figure, and the rule leaves the stall alone entirely, including the zero itself. Seven flags again. The lesson generalises past this record: a rule is a piece of work like any other, it can be wrong, and the only thing that found this one wrong was somebody running it, counting the flags, and asking why the count was not what they expected. Reading the sentence a second time would never have done it.

A CORRECT FIGURE BROKE THE RULE NB-04 Peetal Utensils against rule five as it was first written, with no mention of above nothing. NB-04's FOUR MONTHS, AND WHERE THE CUTOFF LANDED five times nothing is nothing so the cutoff sits here, at Rs 0/- month 1 Rs 26,000/- FLAGGED month 2 Rs 0/-, and it is correct. The stall took nothing. month 3 no row at all, so nothing to measure month 4 Rs 28,000/- FLAGGED WHAT THE WHOLE RULE SET RAISED, BEFORE AND AFTER THE REPAIR 9 flags as first written, and 2 of them are false 7 flags once the three words are added
Rule five as first written raised nine flags rather than seven, and the two extra ones were caused by NB-04 Peetal Utensils' entirely correct month of Rs 0/-.
Try it out

Rule five as first written raised nine flags instead of seven. What caused the two extra ones?

Risk Management Program Bootcamp — Fin Maverick

What can no rule reach, however many are written?

Nine faults were put into this record deliberately when it was built for teaching. The seven flags reach six of them: the blank cell, the row that is not there, the office code, the two rows sharing one stall and one month, the two cells reading Rs 4,80,000/-, and the pitch recorded in the wrong unit. Three faults raise no flag at all, and no seventh or eighth rule of the same kind would change that. Each of the three is invisible for a different reason, so name all three exactly.

The first is NB-03, whose name is typed Harit Greens for the first two months and Harit Green for the last two. Every rule in this set keys on the stall identifier NB-03, consistent throughout, and no rule in this set looks at the name column at all. Nothing is out of range, nothing is empty, nothing is duplicated on the key. The record simply carries two spellings of one stall and passes clean. The second is the licence number. The licence number is a four digit whole number in every row, every value is a valid licence, and nothing about it breaks any rule that could be written about a cell. A licence number is a label rather than a quantity. The ten of them added together and divided by ten come to 2510.8, a number that sorts, prints and averages perfectly and means absolutely nothing. The third is the survivorship gapThe distance between a figure computed on everything that existed and the same figure computed on only the part that is still around to be counted. The survivorship gap is covered in its own right elsewhere in this subject area.. NB-09 Roshni Juice and NB-10 Amber Rolls stopped trading once month 2 ended, and the office took them out of the file altogether, their first two months along with them, without leaving a note anywhere saying it had done so.

The last of the three is the expensive one, so put a number on it. Month 1's takings, spread over the eight stalls the office kept, come to Rs 38,500/- a stall: month 1's total for those eight, divided by eight. The same month's takings across the ten stalls that really traded come to Rs 35,000/- a stall, the same arithmetic over a denominator of ten. The gap is Rs 3,500/- a stall a month, 10.00 per cent, and every rule in the set runs over that file and finds it spotless. Validation asks whether a cell is allowed. Validation never asks whether a cell is true, and it never asks whether the record covers what it is supposed to cover.

NINE FAULTS, SIX REACHED, THREE FREE Every fault put into the Neelbagh stall record on purpose, against the rule that found it. the fault which rule reached it NB-04 Peetal Utensils' month 3 has no row at all R3 flagged NB-05 Bansi Flour's month 2 has a row and an empty takings cell R1 flagged NB-02 Chandan Tea's month 4 reads Rs 99,999/-, the office code R4 flagged NB-03 Harit Greens' month 2 appears twice, with different figures R2 flagged NB-07 and NB-08 both read Rs 4,80,000/- in month 3 R5 flagged twice, and it cannot say which one is the error NB-05 Bansi Flour's pitch reads 14 in a square feet column R6 flagged NB-03 is written Harit Greens twice and Harit Green twice nothing. No rule in the set reads the name column licence_no is a label, and it averages to 2510.8 nothing. Every value is legal NB-09 and NB-10 closed and the office deleted them nothing. The rows were gone first The last one is the expensive one. Month 1's takings over the eight stalls the office kept give Rs 38,500/- a stall. The same total over the ten stalls that really traded gives Rs 35,000/-. One numerator, two denominators, and the gap is Rs 3,500/- a stall a month, 10.00 per cent, sitting in a file that all six of the rules pass clean. A rule asks whether a cell is allowed. It never asks whether it is true, or whether the record covers what it should.
Three of the nine faults raise no flag at all: two spellings of one stall name, a licence number that averages to nothing meaningful, and a Rs 3,500/- survivorship gap in a file that passes clean.
Try it out

Which set of three faults goes entirely unflagged by all six rules?

Which comes first, and what breaks when the two are swapped?

The order is validate, decide, clean, record, and each of the four is a separate act with a separate output. Validate produces flags. Decide produces a judgement on each flag, explicitly including the judgement to leave something alone. NB-04's Rs 0/- and NB-07 Sundari Chaat's genuine Rs 4,80,000/- both deserve a decision saying no change, and that decision is worth as much as any change. Clean produces a different record. Record produces the line that says what happened and who said so.

Cleaning before validating leaves the rules running against a file somebody has already altered, so they approve the alterations, and the only independent check there was has been destroyed. Nothing complains. Nothing fails. The flags simply come back cleaner than they should, and they come back cleaner precisely because the file has been quietly changed. Cleaning first is proofreading a letter after somebody has rewritten the sentences they disagreed with. The letter reads perfectly, and nothing whatsoever has been learned about the letter that was actually sent.

FOUR STEPS, AND WHY THE ORDER IS THE WHOLE THING THE ORDER THAT WORKS VALIDATE 7 flags out record untouched DECIDE a person, on each flag record untouched CLEAN the change is made record changes here RECORD what changed, and why signed by a name THE FIRST TWO SWAPPED, AND WHAT IT COSTS CLEAN tidy it up a bit first record already altered VALIDATE fewer flags out and it approves them THE INDEPENDENT CHECK IS GONE The rules are now checking the analyst's own edits, and a clean result proves only that the editing was consistent. Proofreading a letter after somebody has quietly rewritten the parts they disagreed with shows only that the letter reads well. It says nothing at all about the letter that was sent, which is the only thing the reading was for. A decision to leave something alone is a decision, and it belongs in the written line exactly like a change does.
Cleaning before validating ends with the rules approving the analyst's own alterations, which quietly removes the only independent check the process ever had.

A tool that flags and fixes in the same step

The market office is offered a piece of software that runs rules over a file and puts right whatever they catch. The tool runs in nine seconds. The tool flags NB-05 Bansi Flour's empty month 2 cell and writes a zero into it. The tool flags both cells reading Rs 4,80,000/- and pulls each of them down towards its own stall's other months. The tool flags NB-03 Harit Greens' repeated month and keeps whichever of the two rows it happened to meet first. The file comes out the other side with no flags on it.

Every one of those flags was correct. The correctness of the flags is what makes the result uncomfortable. Each fix was made without anybody deciding it. The record now asserts that NB-05 Bansi Flour traded a month and took nothing. Nothing of the sort happened, and a blank cell was honestly refusing to claim it. The tool has flattened NB-07 Sundari Chaat's real Rs 4,80,000/- month, a genuine wedding order and the largest thing that happened in the market all year. NB-08 Peeli Mithai's typing error was flattened too, by the same amount, for the same reason, the tool having no way to tell the two apart. And NB-03's repeated month was settled by file order. File order is not a rule anybody stated, and it would give a different answer if the rows had been typed in the other sequence.

The fault is not in the rules and re reading them would never find it: the fault is that a flag became a change with nobody in between. The habit that closes it off is one sentence long. A rule may raise a flag and a person signs the change, and those are never allowed to be the same step.

FLAGS IN, ALTERED CELLS OUT, NOBODY IN THE MIDDLE The same three flags, run through a tool that treats raising a flag and making a change as one action. NB-05 month 2, left empty two cells at Rs 4,80,000/- NB-03 month 2, twice over FLAG AND FIX IN ONE STEP nine seconds, no flags left a month of Rs 0/- asserted a real month flattened too settled by file order where the person who decides should have been standing nothing here Every flag above was correct. A correct flag becoming a change without a signature is still a record nobody decided.
A tool that silently fixes whatever a rule flags has removed the person who was supposed to decide, and with them the written reason anything changed.
Try it out

A tool flags a cell and fixes it in the same step, and every flag it raised was correct. What has been removed?

Derivatives Foundation Bootcamp — Fin Maverick Bond Pricing and Yield Mechanics — free micro-course from Fin Maverick

What makes a set of rules worth having?

The same holds at any desk where somebody hands over a file and asks for a number. A lender reading four quarters of a small borrower's sales, an analyst handed a spreadsheet of branch takings, a household going through a year of bank messages before applying for a loan: the four things that separate a rule set worth running from a ritual are the same in all three places.

First, every rule traces to a line of the written column list. Somebody who argues with a flag is then arguing about the list rather than about the flag. Second, every rule was run and its flag count written down before anybody looked at what it caught. The discipline of counting first is what found rule five broken. Third, every flag has a decision recorded against it, including the decision to change nothing. An unrecorded decision to leave something alone is indistinguishable later from nobody having looked. Fourth, somebody has written down the list of what the rules cannot see. The fourth is the one nobody writes, and it is the only one that would have caught the Rs 3,500/- gap. A pipelineA chain of automatic steps a file passes through, each one handing its output to the next without anybody looking in between. Building one is covered separately under programming for finance. that silently fixes whatever a rule flags has skipped the second, third and fourth all at once.

FOUR THINGS, AND THE FOURTH IS ALWAYS THE EMPTY ONE What separates a rule set worth running from a ritual that produces a tick. 1. EVERY RULE TRACES BACK Each sentence points at the line of the written column list it came from, so an argument about a flag becomes an argument about the list. 2. THE COUNT COMES FIRST Run it, write down how many flags it raised, and only then look at what they landed on. Nine against an expected seven is how rule five fell. 3. A DECISION AGAINST EACH FLAG Including the decision to change nothing. An unrecorded decision to leave a cell alone reads later exactly like nobody having looked at it. 4. WHAT THE RULES CANNOT SEE left blank, on almost every desk On this record the fourth list is the only one that would have said out loud that two stalls were missing entirely.
Every rule traces back to the column list, the flags are counted before they are read, a decision is recorded against each one, and what the rules cannot see is written down.
The cleaning steps themselves and what each one moves are covered separately, where the six steps and the Rs 14,838.90/- are worked through properly. Deciding whether an unusually large figure is an error or a real month is covered separately too, and is the harder question of the two. Building a run that applies rules to a record automatically is covered separately under programming for finance. Writing down what a cell may contain and then checking cells against it needs no rate, no threshold and no filing period from anywhere else.
Hypothesis Testing teaches you to run a test, say what it can and cannot support, and recognise a manufactured result.

Where did every figure here come from, and how would one of them be checked?

No figure above was looked up anywhere. The faults were placed in the record on purpose and the whole grid is printed in full, so every flag count can be arrived at by hand with a pen in about ten minutes. Six sentences over thirty two rows is small enough to hold in the head all at once. A rule set is therefore one of the few things in this subject that can genuinely be audited by hand.

What was usedWhat it isWhere it sitsWhen it was last gone through
The rule sheet behind this guideSix sentences, each traced back to a line of the written column list before it was ever runKept with the teaching notes for this subjectRebuilt and rerun 23 August 2026
The recomputation behind every rupee figureA script that lays the record out row by row, runs the rules over it and counts what they raiseKept with the teaching notes for this subjectRebuilt and rerun 23 August 2026
The two subjects this guide leans onThe written column list, and the run whose net move on the takings figure is quoted here exactly onceKept with the teaching notes for this subjectRead again 23 August 2026
Any rate, standard or published thresholdNone is used, so none is stated. The five in rule five was chosen by a person at the market officeNowhere, and that is the honest answerNot applicable

The Neelbagh market, the Neelbagh stall record, the market office, the day book and all ten stalls standing in it, NB-01 Kadamba Idli, NB-02 Chandan Tea, NB-03 Harit Greens, NB-04 Peetal Utensils, NB-05 Bansi Flour, NB-06 Ilaka Fruit, NB-07 Sundari Chaat, NB-08 Peeli Mithai, NB-09 Roshni Juice and NB-10 Amber Rolls are invented.
Educational material. Not advice on any investment, tax, budget or market position.

← PreviousNext →
Fin Maverick Micro CoursesExplore Micro 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
CalculatorsFrameworksComparisonsCareersShowdown
RESOURCES
All CoursesMicro 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.