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
Quantitative Methods, Financial Data & Programming
1Probability
Probability in FinanceRandom VariableProbability DistributionsThe Normal DistributionNormal Distribution ProbabilityThe Lognormal DistributionRandomness vs Uncertainty
2Statistics 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…
3Correlation and Regression
RegressionCorrelation and CausationOrdinary Least SquaresInteraction TermsRegression CoefficientsRegression vs ClassificationHow to Build a…Spurious CorrelationRegression, Correlation and FitResidualsMulticollinearityAutocorrelation and Partial Autocorrelation
4Time 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
5Simulation and Numerical Methods
SimulationMonte Carlo SimulationHow to Run a…Numerical MethodsIterationResampling and the BootstrapPseudorandom Numbers and the SeedConvergence and ToleranceNumerical Stability
6Optimisation
OptimisationLocal and Global OptimaConstraintsConvex OptimisationThe SolverLinear ProgrammingThe Objective FunctionConstraint ViolationThe Feasible SetLagrange MultipliersQuadratic Programming
7Modelling 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
8Backtesting and Research Integrity
BacktestingBacktest vs Live PerformanceHow to Document a…How to Prevent Backtest…Out-of-Sample TestingWalk-Forward AnalysisMultiple TestingP-HackingData Snooping
9Data 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
10Programming for Finance
Data PipelinesAPIs for Financial DataAPI vs CSV FileDatabases in FinancePython for FinanceJoinsSQL for FinanceThe Analysis Workflow
11Quantitative Research
Research DesignThe Data Generating ProcessReproducibilityPeer Review in Analytical WorkThe Research HypothesisRobustness and Sensitivity

Data Pipelines: From Raw Source to Analysis-Ready Table

Two people are handed the same file. Both work carefully, neither guesses at anything, and the two figures they arrive at are Rs 14,838.90/- apart. The gap is not a story about carelessness. A file is a pile of characters, and everything anybody does to it afterwards happens somewhere nobody wrote down, so a gap of that size is what happens by default. Writing it down is what closes the gap. One invented record runs the whole way below, with a row count at every stop and no arithmetic harder than a sum divided by a count.

The record and the counting rule

The Neelbagh stall record. An invented covered market, an invented market office, and that office keeping one row per stall per month across four months. The file it hands over has 32 rows and 8 columns. The file already carries every one of its faults, and those faults are settled elsewhere: a month with no row, a takings cell left empty, an office code sitting where a figure should be, one stall month typed in twice, a stall name spelled two ways, a five figure typing error, and a pitch area recorded in the wrong unit. None of that is diagnosed again here. The record is used here as it stands.

The counting rule, and it travels with every figure. The average takings per stall month is the sum of every takings cell that holds a real figure, divided by however many cells were added. Two kinds of cell are kept out of both halves of that. An empty box is one, holding no figure at all. The office code standing in for no return received is the other, a label wearing digits rather than an amount. A zero is a figure somebody wrote down on purpose, so a stall that opened its shutter and took nothing keeps its zero. The rule is a conventionA choice about how something is counted, written down in advance so that a second person can repeat it and land in the same place. rather than a discovery. A convention has to be stated in the same breath as any figure it produces.

Counting, and nothing harder. Every quantity below is a count of rows, a count of cells, or one of those counts divided into a sum. Nothing below needs any other arithmetic.

What is a data pipeline, and what is it for?

A data pipeline is a named path with named stages, run in a fixed order, where every stage says what it read, how many rows went in, how many came out, and why. The definition ends there. There is nothing clever inside it and nothing technical about the idea. The writing down is not a feature of a pipeline, it is the entire thing that separates a pipeline from a person who once did some work on a file.

Here is the everyday version. Think of a household running on one salary that keeps every bill in one box, writes the month on each one as it goes in, and never throws an original away. At the end of the year somebody asks what the household actually spent on electricity. The paper that produced every figure is still there and still labelled, so the answer is recoverable. Now think of the household next door. Just as careful, it adds each bill into a notebook the day it arrives, and then bins the bill. The second household has the totals and only the totals. If a figure looks wrong, there is nothing to go back to. Both households did the work. Only one of them can prove it.

KEEPING THE ORIGINALS AGAINST COPYING THE TOTALOne household, two ways of recording the same year of bills.THE BOX WITH EVERY BILL STILL IN ITTHE FRESH PAGE WITH THE TOTALS ON ITthe April bill, kept wholekeptthe May bill, kept wholekeptthe June bill, kept wholekeptthe July bill, kept wholekeptApril, one figure copied acrossgoneMay, one figure copied acrossgoneJune, one figure copied acrossgoneJuly, one figure copied acrossgoneAny month can be rebuilt from the paperthat made it, without asking anybody.No month can be rebuilt. The figures areall that survived, and they are not checkable.Both records are complete and both are tidy. Only one of them can settle an argument about a month.
Keeping the original paper means any month can be rebuilt from what produced it, while copying the total onto a fresh sheet leaves figures nobody is able to check.

A record travelling through an office is the same shape of problem at a larger size. Somebody receives it, somebody removes the rows that should not be counted, somebody corrects a cell, somebody produces a figure, and the figure goes into a note. Every one of those hands did something reasonable. If none of them wrote down what they did and how many rows they had before and after, the figure at the end is a number with no history, and a number with no history cannot be defended or corrected. A number with no history can only be repeated.

So what a pipeline is for is not speed and it is not automation. A pipeline exists so that a figure can be walked backwards to the cell that made it. Speed is a side effect of writing things down properly. The purpose is that when two people disagree, the disagreement can be located.

Try it out

A pipeline and a set of steps somebody carried out once on a file are not the same thing. What does the first one have that the second one does not?

Where does a record arrive from, and what does each doorway settle?

A record arrives through one of three doorways. One is a file somebody hands over. Another is the answer to a request sent to an address. The third is a table already sitting in a store that somebody else set up. The Neelbagh stall record arrives here through the first of the three: the market office types it up and passes it across, once, whole.

The second and third doorways are real and they matter. The shape of a request, the shape of the answer that comes back, and what happens when the answer arrives a batch at a time rather than all at once, are covered separately. Where a stored table actually sits, what it declares about itself before a single row is read, and what it turns away at the door, is also covered separately. Naming a doorway is not the same as teaching it.

THREE DOORWAYS, AND THE SAME THREE FACTS FROM EACHWhere a record comes in, and the only thing the path in front of it needs to know.a file somebody hands overan answer to a request sent to anaddressa table already sitting in a storeWHAT THE PATH NEEDS1what arrived2when it arrived3how many rows it hadNot one of the three is the record itself.The doorway changes what has to be done to get the record. It does not change what has to be written down when it lands.
A record arrives as a handed over file, as an answer to a request sent to an address, or from a store, and the path needs the same three facts from every one of them.

The pipeline needs the same three facts from every doorway, and there are only three. Which record arrived. When it arrived. How many rows it had. None of the three is the record itself. All three are facts about the delivery, and they are the first three lines of the written trail, before a single row has been touched. If all three cannot be answered about a file already in hand, the pipeline has already lost its first stage.

The doorway does change one thing worth flagging, and it is the thing readers most often assume away. A handed over file tells nothing at all about when it was last changed. The file has a name and it has contents, and the name is frequently a lie about the contents. A stored table usually knows something about when it was last written to, for the simple reason that somebody built it to know. An answer to a request usually arrives stamped with the moment it was assembled. The doorway that inspires the most confidence is often the one that tells the least.

Try it out

A record can arrive as a handed over file, as an answer to a request sent to an address, or from a store somebody else set up. Which of the three usually tells the least about when it was last changed?

What is a CSV file, and what does it fail to declare?

A comma separated file is about as simple as a data format gets. Everything in it is plain textA file holding nothing but ordinary characters, with no hidden formatting, colours, formulas or settings of its own. Opened in any text editor, what appears is all there is.. One line per row. A delimiterThe character a file uses to say where one column stops and the next one starts. A comma is the usual choice, which is where the name comes from. between the columns. A header line on top carrying the column names. The header is how the columns are told apart. The Neelbagh file has that header line and 32 data rows across 8 columns, making 256 cells in total.

THE FILE AS IT ACTUALLY READS, AND WHAT IT NEVER SAYSSeven of the 32 data rows, printed exactly as the office typed them.stall_id,stall_name,licence_no,category,month,takings_rupees,pitch_sqft,filed_on_dayNB-01,Kadamba Idli,2104,Cooked food,1,42000,120,6NB-03,Harit Greens,2318,Vegetables,2,36400,100,5NB-03,Harit Greens,2318,Vegetables,2,39700,100,19NB-05,Bansi Flour,2477,Groceries,2,,14,7NB-07,Sundari Chaat,2618,Cooked food,3,480000,90,8NB-08,Peeli Mithai,2743,Cooked food,3,480000,110,8NB-02,Chandan Tea,2216,Beverages,4,99999,60,6... and 25 more rows in the same shape ...4223132 data rows, 8 columns, 256 cells in all.1the office code sitting in a takings column, and the file cannot say it is a code2the same stall and month typed twice, and nothing in the file objects3an empty cell, and the file never says whether that means nothing sold or nothing typed4an identifier stored as a whole number, which will average if nobody stops itEvery one of the four is a thing the reader has to decide, because the file declares none of them.
A comma separated file carries a header line, a delimiter and the data, and it declares no type, no key and no meaning for an empty cell.

Now the important half, and it is the half that gets skipped. A comma separated file declares no type, no key and no meaning for an empty cell, so every one of those three becomes a decision somebody makes silently while reading it. Take them one at a time on this record.

No type. The file has a column of licence numbers holding values like 2104 and 2743. Licence numbers are digits, so anything reading the file will treat them as quantities, and their average is 2426.375. The average of a licence number is not money, not an area, not a count of anything and not a fact about the market. A licence number is an identifierA value whose only job is to name a thing. It never means anything as a quantity, so adding two of them together or averaging them produces a number with no meaning at all., and the file has no way to say so. The month column has the same problem in a quieter form: months numbered 1 to 4 will happily average to 2.5.

No key. Nothing in the file says that a stall and a month together should appear once. So NB-03 in month 2 appears twice, once at Rs 36,400/- filed on day 5 and once at Rs 39,700/- filed on day 19, and the file raises no objection whatsoever. It cannot. Nobody told the file that a stall month is meant to be unique, and there is nowhere to tell it.

No meaning for an empty cell. NB-05 in month 2 has a row and an empty takings cell. NB-04 in month 2 has a row and a takings cell reading zero. The two cells look almost identical at a glance, and they mean completely different things: one is a stall that traded nothing, the other is a stall whose figure never got typed. The file cannot say which is which. A human decided, later, somewhere else.

EVERY CELL IN THE FILE, AND THE THREE THAT MOVE THE ANSWERThirty two rows down, eight columns across, drawn to scale.idnamelicencecategorymonthtakingspitchfiledrow 1row 5row 9row 13row 17row 21row 25row 29moves the answerlooked at, but moves nothingThree cells out of 256, which is 1.17 per cent of the file, carry the whole net move of Rs 14,838.90/-.The rest of the file is not in question at all. It is copied from one stop to the next without a mark on it.
The file holds 256 cells, and three takings cells, which is 1.17 per cent of it, carry the whole net move of Rs 14,838.90/- between the two ends of the path.

None of this makes a comma separated file a bad thing to be handed. The format is portable, it opens anywhere, and it will still open in twenty years. The point is narrower and more useful than that: a file carries data and it carries no promises about that data, so every promise relied on afterwards is one the reader made alone. Writing those promises down is the first real stage of the pipeline.

Try it out

The Neelbagh file has a column of licence numbers stored as whole numbers. What will a reader do with that column sooner or later, and what would stop them?

What are the stops, and how many rows survive each one?

Here is the whole path in one table. Seven stops, counting the file as handed over as stop zero. Read the rows column first and ignore the money entirely on the first pass. The row count is the part almost nobody records and the part that settles almost every argument.

StopWhat ranRowsCarrying a numberThe figure afterThe move
0as handed over3231Rs 69,035.45/-
1drop the blank row3131Rs 69,035.45/-no change
2drop the office code row3030Rs 68,003.33/-down Rs 1,032.12/-
3drop the withdrawn duplicate2929Rs 69,093.10/-up Rs 1,089.77/-
4correct the typing error2929Rs 54,196.55/-down Rs 14,896.55/-
5fix the two spellings2929Rs 54,196.55/-no change
6fix the pitch unit2929Rs 54,196.55/-no change
SEVEN STOPS, AND THE ROW COUNT AT EVERY ONERows in, rows out and the figure after, written down at each stop.as handed overstop 032rows31 usableRs 69,035.45/-drop the blank rowstop 131rows31 usableRs 69,035.45/-no changedrop the officecode rowstop 230rows30 usableRs 68,003.33/-downRs 1,032.12/-drop the withdrawnduplicatestop 329rows29 usableRs 69,093.10/-upRs 1,089.77/-correct the typingerrorstop 429rows29 usableRs 54,196.55/-downRs 14,896.55/-fix the two spellingsstop 529rows29 usableRs 54,196.55/-no changefix the pitch unitstop 629rows29 usableRs 54,196.55/-no change323029rows survivingThe row count falls at three of the six steps and then holds. The figure moves at three of them too, but not at the same three.
The record passes seven stops and the row count falls at only three of them, from 32 to 31 to 30 to 29, where it then holds for the rest of the path.

The row count falls three times, from 32 to 31 to 30 to 29, and then holds for the rest of the path. Two of the seven stops change a cell without changing the row count at all, and the last one changes a cell in a column the figure never touches. A stage that changes the row count and does not say so is the commonest way a figure goes wrong quietly. Nothing about the output looks different afterwards. A table with 29 rows and a table with 30 rows look identical at a glance, and they answer the same question differently.

The column headed carrying a number is the second thing worth staring at. The count in it is the denominatorThe count sitting underneath an average. It decides what the average is an average of, so two people using different ones will get different answers from identical data and both will be right. underneath every figure in the table. One takings cell is empty, so at stop zero there are 32 rows and only 31 of them carry a number. From stop one onward the two counts move together. The single row of divergence at the top is why the first cleaning step moves the figure by nothing at all.

Try it out

At one stop the row count falls from 30 to 29 and the figure goes up rather than down. Which stop is it, and why can dropping a row raise an average?

Try it out

Three of the six cleaning steps move the answer by nothing at all. Which three, and what do they have in common?

What does each cleaning step move the answer by?

Six steps run between stop zero and stop six. Written out as words, the moves are: no change, down Rs 1,032.12/-, up Rs 1,089.77/-, down Rs 14,896.55/-, no change, and no change. Add those and the record ends Rs 14,838.90/- below where it started.

WHAT EACH CLEANING STEP MOVES THE ANSWER BYSix steps, drawn on one scale in rupees. Left is down, right is up.no movestep 1 drop the blank rowno changestep 2 drop the office code rowdown Rs 1,032.12/-step 3 drop the withdrawn duplicateup Rs 1,089.77/-step 4 correct the typing errordown Rs 14,896.55/-step 5 fix the two spellingsno changestep 6 fix the pitch unitno changeAND HERE IS THE ANSWER AT EACH OF THE SEVEN STOPSstop 0Rs 69,035.45/-stop 1Rs 69,035.45/-stop 2Rs 68,003.33/-stop 3Rs 69,093.10/-stop 4Rs 54,196.55/-stop 5Rs 54,196.55/-stop 6Rs 54,196.55/-Three of the six steps move nothing at all, one moves the answer up, and two of the six carry the whole net move down ofRs 14,838.90/-.
Three of the six cleaning steps move the answer not at all and one moves it up, so two steps out of six carry the whole net move down of Rs 14,838.90/-.

The first surprise is that three of the six steps move the answer by absolutely nothing, and every one of the three was still worth running. Dropping the blank row removes a row that was never in the denominator to begin with, so the arithmetic cannot move. Fixing the two spellings of NB-03 changes a name column that no figure in the ladder reads. Fixing the pitch area from 14 to 150 square feet changes a column about floor space, not money. A step that moves the answer by nothing has done something valuable anyway: it has made it possible to say, in writing, that it moved the answer by nothing. Before it runs, that is not known. Afterwards it can be proved, and the next person does not have to wonder.

The second surprise is that one step moves the answer up. Dropping the withdrawn return takes the record from 30 rows to 29 and lifts the figure from Rs 68,003.33/- to Rs 69,093.10/-. NB-03 filed twice for month 2, Rs 36,400/- on day 5 and Rs 39,700/- on day 19, and the one that was withdrawn is the smaller of the two. Remove the smaller of two figures and what is left averages higher. Nothing was invented and nothing was inflated. A row that should never have been counted stopped being counted, and the answer went up.

The direction of that step is worth holding on to. The instinct almost everybody carries into this work is that cleaning means shrinking. It does not. Cleaning a record is a walk, not a reduction, and the direction of any single step is a fact about which cells that step touched rather than about cleaning in general. On this record the walk goes flat, down, up, a long way down, flat, flat. On a different record with the same six kinds of step it could go the other way at any of them.

Try it out

A colleague looks at the table and argues that a step which moved the answer by nothing was a waste of time. What is the one sentence that answers them?

Try it out

The calculator below walks the record from as handed over to fully cleaned. Does the figure fall at every step, hold at some and fall at others, or actually move in both directions?

Play with it

The record stop by stop, with the trail written along the way

One control, seven stops. Three things redraw together: the rows still in the record, the average takings figure against a fixed line at the reading as the file was handed over, and the move from the stop immediately before. Underneath, every stop landed on writes itself into a trail that stays on screen. A trail like that is the whole of what makes a path checkable. Landing on all seven builds the audit trail by hand.

WALK THE RECORD FROM STOP TO STOP AND WATCH BOTH READINGS MOVEOne control, seven stops. The rows bar, the figure bar and the move bar all redraw together.ROWS SURVIVINGTHE AVERAGE TAKINGS PER STALL MONTH3229as handed over, Rs 69,035.45/-2929 of them carry a numberRs 54,196.55/-over 29 usable cellsTHE MOVE FROM THE STOP BEFORE ITno moveno changethe answer falls this wayand rises this way
stop 6

The trail written so far

Educational illustration. The denominator never moves across the seven stops: only a takings cell holding a figure somebody could actually bank is counted, so an empty box and the office no return code stay out of it while a genuine nil stays in. The full wording of that rule is set out in the opening panel. Every quantity below the bars is a count of rows, a count of cells, or one divided into the other.

Breaking Into Quants Bootcamp — Fin Maverick

What happens when the record is actually walked, stop by stop?

The panel above moves through the path. The same walk is written out below, in words that survive without the panel and can be read straight through.

Stop zero, as handed over. 32 rows, 8 columns, 256 cells, and 31 of the takings cells carrying a number. The 31 cells sum to Rs 21,40,099/-, and over 31 that gives Rs 69,035.45/-. The figure is arithmetic and it is correct, and it is answering a question nobody asked. One of the 31 cells is an office code, and one stall month is in there twice.

Stop one, drop the blank row. 31 rows. An empty cell was never inside the sum or the count, so neither one changes. The figure stays at Rs 69,035.45/-. Cost of running it: one line of writing. Value of running it: it is now on paper that the blank was not the problem.

Stop two, drop the office code row. 30 rows. NB-02 in month 4 carried 99999. The market office writes that code into the box when no return came in at all, rather than any sum of money. Taking it out leaves Rs 20,40,100/- over 30, and that is Rs 68,003.33/-. The figure comes down by Rs 1,032.12/-. One five digit code among thirty genuine figures moved the answer by about a thousand rupees. A move of that size is easy to miss and impossible to explain later.

Stop three, drop the withdrawn return. 29 rows. Rs 20,03,700/- over 29 is Rs 69,093.10/-, and the figure has gone up by Rs 1,089.77/-. Worth pausing on: the record is now strictly more correct than it was at stop zero, and it reads higher than it did at stop zero. Half cleaned is not the same as half way to the answer.

Stop four, correct the typing error. 29 rows still. NB-08 in month 3 was typed as Rs 4,80,000/- when the return slip in the day book reads Rs 48,000/-, so one cell loses a digit. The sum falls to Rs 15,71,700/-, and over 29 that is Rs 54,196.55/-. Correcting that one cell moves the answer by Rs 14,896.55/-, more than the whole net move of the entire path. NB-07 in month 3 also reads Rs 4,80,000/- and is left exactly as it is. The NB-07 figure is a real month.

Stops five and six, the two spellings and the pitch unit. 29 rows, and the figure holds at Rs 54,196.55/- through both. One file, seven stops, a row count written down at every one, and a net move down of Rs 14,838.90/- that two of the six steps produced between them.

AI For Finance Bootcamp — Fin Maverick

How to build an audit-friendly data pipeline: what does every stage write down?

The recipe at the centre of all this is five lines long. Every stage in the path writes down what it read, how many rows went in, how many came out, the rule it applied in one sentence, and the figure afterwards. Five lines, and the recipe is complete. There is no tooling in it and no vocabulary to learn.

ONE STAGE, OPENED UP, WITH WHAT IT WROTE DOWNThe stop that drops the office code row, as it would actually be recorded.STAGE: DROP THE OFFICE CODE ROW1what it readthe table the stage before it left, 31 rows2rows in313rows out304the rule it applieddrop any row whose takings cell carries the office code5the figure afterwardsRs 68,003.33/- over 30 usable cellsFive short lines. That is the entire difference between a path a second person can check and one they can only rerun and hope.
Every stage records what it read, rows in, rows out, the rule it applied and the figure afterwards, which is what makes a path auditable rather than merely repeatable.

The five lines look almost trivially small until it becomes clear what having them makes possible. The test that separates an auditable path from a merely repeatable one is this: a second person, given the file as handed over and nothing else, reaches Rs 54,196.55/- on their own, and can point at the exact stage where any figure of the first person's differs from theirs. Repeatable gets the first half. Only the written counts get the second half, and the second half is the half that ends arguments.

RERUNNING A PATH AGAINST BEING ABLE TO CHECK ONEThe same three questions asked of both, and only one of them answers all three.a path that can be run againa path whose stages report theircountsCan it be run a second time?yesyesCan a difference be located to a stop?noyesCan a stranger reach the same figurewithout asking a question?noyesBoth paths give the same table. Only the second one shows where two people parted company.
A path that can be run again is repeatable, and a path whose stages report their row counts is auditable, and only the second of the two can settle an argument.

The everyday version again, and this one is easy to feel. A stall keeper writes the day's takings on the back of the same delivery slip the goods arrived on. The two numbers are physically attached to each other, and that keeper can settle any argument about that month. The keeper who copies a total onto a fresh sheet each evening has a tidier book and can settle nothing. The total and the slip that produced it now live in different places, and nobody can tell which one moved.

One of the five lines does the most work: the figure afterwards. Rows in and rows out show that something changed. The rule shows what was intended. But without the figure recorded at each stage, two people comparing their work can only tell each other that they disagree, and cannot tell each other where. The written figure at each stage is what turns a disagreement about a number into a disagreement about a rule, and a rule is something two people can actually settle.

One more thing this discipline buys, and it is the reason it survives contact with real work. When somebody asks six months later why the figure is Rs 54,196.55/- and not Rs 69,035.45/-, the answer is not a memory and not a reconstruction. The answer is a line in a written record that says a row carrying the office code was dropped, and another that says a five figure cell was corrected against the day book. Nobody has to be trusted. The record does the trusting.

Try it out

A stage in an auditable path writes down five things. Which of these is the complete set?

What should be asked of any table handed over as ready?

Most of the time the path will be somebody else's work. A table arrives, described as ready, and the sender waits. Six questions cover almost everything that can be wrong with it, and all six can be asked in under a minute without opening the file.

SIX QUESTIONS TO ASK BEFORE USING A TABLEAnything handed over as ready, before a single figure is quoted from it.HANDED OVER AS READYanswered?1How many rows arrived, and how many are here now?2What was dropped, and under which rule?3Was anything changed in place rather than dropped, and where is the original?4What does an empty cell mean in this table?5What is the denominator behind every figure quoted from it?6Can it be rebuilt from the source without asking anyone a question?A table handed over without a row count is not a small gap in the record of where it came from.It is a table nobody can check.
Six questions asked of any table handed over as ready, because a table arriving without a row count behind it is a table nobody is able to check.

Take them in order. How many rows arrived and how many are here now? The row count is the one question that most often has no answer at all, and it is the one that makes the other five answerable. What was dropped, and under which rule? Rows leaving is normal. Rows leaving without a stated rule is not. Was anything changed in place rather than dropped, and where is the original? A corrected cell is invisible afterwards. NB-08 reading Rs 4,80,000/- and NB-07 reading Rs 4,80,000/- are dangerous sitting next to each other for exactly that reason: one of them got fixed and the other did not, and the finished table shows no sign of either.

What does an empty cell mean in this table? If nobody can answer, then somewhere upstream a person decided, and the decision is now inside the figure without a name. What is the denominator behind every figure quoted from it? The same numerator over a different count produces a different answer and both are defensible. Which count belongs underneath a figure is set out under the choice of denominator. And can it be rebuilt from the source without asking anyone a question? If the honest answer is no, the table has a person inside it, and people leave.

One word covers all six questions. ProvenanceThe written record of where a figure came from and what was done to it on the way, kept alongside the figure itself rather than in somebody's memory. is not paperwork and it is not a formality. A table handed over without a row count is not a small gap in the record of where it came from. A table without a row count is a table nobody can check, and every figure taken from it is a figure taken on trust. Lenders reading a borrower's monthly sales file, analysts reading a schedule inside a set of accounts, and anybody comparing two months of anything all live and die by this, and the discipline is the same at every size. Ask what came in, ask what left, ask under which rule.

Try it out

A colleague hands over a table and says it is ready. There is time for three questions before it is used. Which three buy the most?

Risk Management Program Bootcamp — Fin Maverick Bond Pricing and Yield Mechanics — free micro-course from Fin Maverick

What does it cost when nobody wrote the row count down?

The failure: two figures from one file, and no way to tell which stop they parted at

An analyst runs the cleaning on the Neelbagh stall record, gets Rs 54,196.55/-, writes it into a note and sends it. Three weeks later somebody else opens what they believe is the same file, runs what they believe is the same work, and gets Rs 69,035.45/-. Both of them are competent. Neither of them wrote down a row count at any stage. Neither can say who is wrong.

TWO SLIPS, ONE FILE NAME, AND NO ROW COUNT ON EITHERThe same record, read three weeks apart, by two people who both did the work.FILE: neelbagh_stall_recordaverage takings per stall monthRs 54,196.55/-run in the first weekrows inrows outleft blank on both slipsFILE: neelbagh_stall_recordaverage takings per stall monthRs 69,035.45/-run three weeks laterrows inrows outleft blank on both slipsThe two figures are Rs 14,838.90/- apart, and nothing on either slip says where they parted.With a row count at every stop, the two slips differ at exactly one stop and the argument lasts a minute.
Two figures from one file cannot be reconciled without the row count at each stage, and with those counts recorded they part at exactly one stop.

The cost here is not the gap of Rs 14,838.90/-, large though that gap is. The cost is that the gap cannot be attributed to anything. With the stops recorded, the two runs are laid side by side, they agree down to some stop and disagree from the next one, and the conversation is over in a minute: one of them never dropped the office code row, or one of them never corrected the typing error against the day book. Without the stops, the only honest option is to do the entire thing again and hope the second attempt agrees with itself.

Notice how ordinary the failure is. Nobody was careless, no rule was broken, and no arithmetic was wrong anywhere. The two figures are both correct answers to two slightly different questions, and the difference between the questions was never written down. An unwritten difference between two questions is the whole of the failure.

The fix costs one line per stage: rows in, rows out, the rule, and the figure afterwards. Four short items, written once, at the moment the stage runs rather than reconstructed afterwards. Reconstructed row counts are worth nothing. The person reconstructing them already knows the answer they are trying to reach.

Where this guide stops. The shape of a request and the shape of the answer that comes back are covered separately, as is where a stored table sits and what a declared key turns away at the door. Holding a table in memory and grouping it, putting two tables side by side, asking a stored table a precise question, and the ordered cells that let somebody else rebuild an answer from scratch, each have their own treatment elsewhere. Judging whether a particular figure in the record is an error, and what to do once that judgment is made, is covered separately.

Two figures from one file, no count written down. See what the pipeline owes.

Which record was used here, and how can the arithmetic be redone?

The arithmetic above rests on one invented file and one stated counting rule, both printed in full above, and it can be redone with a pencil: take the file, apply the rule, and the seven stop ladder falls out. If it does not fall out, the stop where the two runs part is nameable.

Used hereWhat it isWhere it can be checked
The Neelbagh stall recordAn invented office file, 32 rows across 8 columns, one row per stall per month over four monthsPrinted whole in the block on comma separated files
The counting ruleWhich cells count towards the average, and which are kept out of both the top and the bottom of itSet out in full in the opening panel, and named beside every figure above
The seven stop ladderRows in, rows out and the figure after, recorded at each stopThe ladder table, and the panel that walks it

The Neelbagh covered market, its market office, its stall record, its day book and all eight stall names are invented.
Educational material. Not advice on any investment, tax, budget or market position.

Next →
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.