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

Pseudorandom Numbers and the Seed: Why Computer Randomness Is Not Random, and How to Reproduce It

A computer's numbers are not random. Every number a computer produces comes out of a written down rule applied to the number just before it, so fixing the starting number fixes the entire run in advance. Multiply by seven, take the remainder on eleven, begin at one, and the run is 7, 5, 2, 3, 10, 4, 6, 9, 8, 1, then 7 again, for ever.

Two rules do all the arithmetic below. Multiply by seven and take the remainderWhat is left over when one whole number has been divided into another as many whole times as it will go. Eleven goes into forty nine four times, and five is left over. on eleven for the small rule; multiply by 16,807 and take the remainder on 2,14,74,83,647 for the working one. Each figure sits beside the starting number that turned it out, so any of them can be made again by hand: a pen is enough for the small rule, and a calculator holding ten digits is enough for the large one.

Are a computer's random numbers actually random?

No. Not slightly, not mostly, not in a technical sense that only a specialist would object to. A computer producing what it calls a random number is running a short piece of arithmetic on the number it produced last time, and returning the result. Nothing is being sampled. Nothing is being observed. There is no coin and there is no dice cup anywhere inside the machine.

The word for this is pseudorandom, and most readers meet it as throat clearing, so the word is worth stopping on before anything else. Pseudorandom sounds like a lawyer's hedge: the numbers are random, and pseudorandom is said only in case somebody sues. The word is nothing of the kind. Pseudorandom is a flatly accurate description, and it means the numbers only look unpredictable from outside, to somebody who has not been shown how they are made. Show them the rule, tell them where the run began, and they can set out the entire run in advance, in order, on paper, before a key is pressed.

Think of a very long song heard a thousand times. Played to a stranger, every note surprises. Played to the person who knows it, nothing does. The notes did not change. Only one of the two listeners holds the rule that produces them. A generator's streamThe run of numbers a rule turns out, in the order it turns them out. The first number, then the second, then the third, on and on for as long as it is asked. is that song. The whole stream is written before anyone hears a note of it.

Almost everything that goes wrong later comes from forgetting this. A person who believes the numbers are genuinely unpredictable will treat two runs from neighbouring starting numbers as two independent draws on the world, will treat a run that repeats itself as a coincidence, and will treat the ability to reproduce a result as a lucky accident rather than as the plain consequence of arithmetic. All three are wrong in the same direction, and each of the three is taken in turn below.

Try it out

Machines describe the numbers they hand out as pseudorandom. Is the prefix there to cover somebody, or does it report what the machine actually does?

Breaking Into Quants Bootcamp — Fin Maverick

Where does each number actually come from?

Here is the whole idea, at a size that can be done in the head: take a number, multiply it by seven, divide by eleven and throw the whole elevens away. The leftover is the next number, and the same arithmetic is then done to it.

Starting at 1: seven times one is seven, and no eleven fits inside seven, so all seven is left over. The first number is 7. Seven times seven is forty nine. Four elevens make forty four, and five is left over, so the second number is 5. Seven times five is thirty five, three elevens make thirty three, and two is left over, so the third is 2. Seven times two is fourteen, one eleven makes eleven, and three is left over, so the fourth is 3. Four lines of arithmetic build a random number generator. Doing it by hand rather than pointing at a ready made one is the entire point.

THE HAND GENERATOR, FOUR STEPS DONE IN FULL THE NUMBER IN HAND TIMES SEVEN ELEVENS THAT FIT, AND WHAT IS LEFT NEXT NUMBER 1 7 times 1 is 7 no eleven fits, so all 7 is left 7 7 7 times 7 is 49 four elevens make 44, and 5 is left 5 5 7 times 5 is 35 three elevens make 33, and 2 is left 2 2 7 times 2 is 14 one eleven makes 11, and 3 is left 3
Seven times seven is forty nine and the remainder on eleven is five, which is exactly why five follows seven in this run, every single time, on every machine anybody ever runs it on.

The small rule is called the hand generator, and it exists for one reason: it can be cranked by hand. Everything about it fits on a single sheet, and nothing about it has to be taken on trust. The multiplierThe number every value gets multiplied by before the remainder is taken. Here it is seven. is 7 and the modulusThe number the remainder is taken on. It fixes how big the world is that the arithmetic is allowed to move around in, because no remainder can ever be as large as the modulus itself. is 11.

The rule these notes actually run on is called the stated generator, and it is the same two steps at a size no pen enjoys: multiply by 16,807, then take the remainder on 2,14,74,83,647. That is all. There is no third step and no hidden ingredient. For a uniform drawA number somewhere between zero and one that is as likely to land in one stretch of that line as in any other stretch of the same width. rather than a whole number, the remainder is divided by the same 2,14,74,83,647. A remainder is never as large as the number it was taken on, so the result can never fall below zero or rise above one.

Try it out

The hand generator, multiply by seven and take the remainder on eleven, has just produced 3. The next two numbers can be worked out on paper before the answer is revealed.

What is a random seed, and what does it actually control?

The seed is the starting number. The definition is that short. Almost every wrong belief about generators is really a wrong belief about the seed, so the seed earns a section rather than a line.

The ground is worth clearing. A seed supplies no randomness, sets no quality level and moves the run neither closer to nor further from unpredictable; all it settles is the entry point into a run the rule has already written out in full. A larger seed does not give better numbers. An odd seed is not luckier than an even one. A seed picked by looking at the clock is not more honest than a seed picked out of fondness for the number. None of these touch the rule, and the rule alone decides what the numbers are.

Consider a wall clock with a second hand. Started at twelve, it goes 1, 2, 3, all the way round to 60 and back to 1. Started at forty, it goes 41, 42, 43, round past 60 and on to 39. The clock has not changed. Neither has which numbers appear on its face, or the order they come in, or how long it takes to come round again. One thing changed: where the hand was pointing when it was let go. A seed is that starting point, and the word oversells it. A seed in the ground grows into a plant that was not there before. A seed here starts nothing growing; it only says which door the run was entered by.

WHAT A SEED MOVES, AND WHAT IT CANNOT TOUCH WHAT IS CHOSEN the starting number, and nothing else at all one of ten FIXED BEFORE ANY CHOICE WAS MADE the multiplier, 7 the modulus, 11 which ten values appear which value follows which that it comes back to its start after exactly ten steps A seed picks a door into the run. It does not build the run.
Everything on the right was settled by the rule before anybody chose a seed, so the only thing a seed can move is which of those fixed values comes first.

Now the part people find surprising, and then find obvious about four seconds later. Because the seed fixes the whole run, running the same generator from the same seed a year apart on a different machine gives the identical numbers. Not similar numbers. The same numbers, in the same order, to the last digit. Repeatability is the reason a seed is worth writing down at all, and it turns a simulated result into something another person can check rather than believe.

The instinct this offends is worth naming. Reproducibility feels like cheating: if the machine can be made to produce the same result every time, surely the randomness has been removed and the answer means nothing. The answer is that the randomness was never there to remove. A simulated run offers a wide set of possibilities explored quickly, and exploring the identical set again tomorrow is a strength, not a compromise. A run nobody can repeat is not more honest, only harder to argue with, and those are two different things.

AI For Finance Bootcamp — Fin Maverick

Do ten different starting numbers give ten different sets of numbers?

The question turns the seed from a definition into a countable fact, and the hand generator is small enough to answer it completely rather than by example.

There are ten seeds available, the whole numbers 1 to 10. Zero is not among them, and the reason takes one line: seven times zero is zero, and the remainder of zero on eleven is zero, so a run seeded at zero produces zero for ever and never leaves. Every other starting number does something. Seed 1 gives 7, 5, 2, 3, 10, 4, 6, 9, 8, 1. Seed 2 gives 3, 10, 4, 6, 9, 8, 1, 7, 5, 2. Seed 5 gives 2, 3, 10, 4, 6, 9, 8, 1, 7, 5.

Read those three again, slowly. Every one of them contains all ten values. Every one of them contains each value exactly once. And every one of them puts those values in the same order as the others, entered at a different point. The ten seeds do not give ten sets of numbers; they give one set of numbers, entered at ten different places, and the seed chooses only the place.

ONE CLOSED RING, AND EVERY SEED SITS ON IT 1 7 5 2 3 10 4 6 9 8 A SEED OF 1 ENTERS HERE ten values, one loop, no way off it Move the red arrow to any other value and the ring underneath is unchanged.
The hand generator's ten values close into a single loop, which is why a starting number can only settle the doorway the run is entered by and never the values waiting inside.

The ring is the honest picture of what a generator is. Everything a reader might want to call random about the hand generator is a property of the ring, and the ring was decided the moment somebody chose 7 and 11. All ten seeds are already on it. Choosing one is choosing a doorway in a corridor that runs in a circle, and once inside, the walk passes every other doorway in the same order no matter which one it began at.

Written out in full, all ten runs look like this. The left column read downwards is the ring itself, in the order the rule visits it.

TEN SEEDS, TEN RUNS, AND THE SAME TEN VALUES EVERY TIME SEED 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th The shaded cells are where the value 1 lands. One step later in the loop each time.
Seed 1 gives 7, 5, 2, 3, 10, 4, 6, 9, 8, 1 and seed 2 gives 3, 10, 4, 6, 9, 8, 1, 7, 5, 2, which is the same loop entered at a different point, and the shaded diagonal is that fact drawn.
Try it out

Seed 8 gives 1, 7, 5, 2, 3, 10, 4, 6, 9, 8. Without cranking anything, say what seed 4 gives.

Try it out

The panel below is about to go from a seed of 1 to a seed of 6. The question is worth settling before it moves: will it show a fresh set of ten numbers, the same ten rearranged, or some of each?

Play with it

Walk into the ring by any of its ten doors

One control and ten settings. Every setting redraws the ring, the run and the marks on the line from zero to one. Watch which of the three actually changes.

Entered at
1
First three drawn
7, 5, 2
Different values seen
10 of 10
Average of the ten
0.5000
Steps back to the start
10

Educational illustration. The hand generator is a tiny rule whose whole loop fits on one screen, and no real run would ever use it. The stated generator is the same two steps at a far larger size: multiply by 16,807, take the remainder on 2,14,74,83,647. Randomness that has to withstand an opponent, such as the sort protecting keys, answers to a separate set of requirements and is covered separately.

Risk Management Program Bootcamp — Fin Maverick

What is a period, and what does a short one cost?

The ring has ten steps. After ten multiplications the hand generator is back at the number it started from, and from there it repeats itself exactly. The count has a name: the period. Because the period is ten, the eleventh number the hand generator produces is fixed before the first one is drawn, and it is the same as the first.

Divided by eleven and marked along the line from zero to one, the ten values show something uncomfortable. The ten marks are perfectly, mechanically even. The gap between neighbouring marks is identical everywhere, and so are the two gaps at the ends. Their sum divided by ten is exactly one half, not approximately, not to four decimal places, but exactly, every whole loop, from every seed.

TOO EVEN TO BE UNPREDICTABLE THE HAND GENERATOR, ALL TEN OF ITS VALUES 0 1 their average, exactly 0.5000 Every gap the same width, both end gaps included. Nothing bunches and nothing is missed. THE STATED GENERATOR, ITS FIRST TEN VALUES FROM A SEED OF 12345 0 1 a wide empty stretch Four crowd the left, the middle is nearly bare, and no two gaps match. That is what ten draws are supposed to look like, and the tidy line above is the odd one out.
Divided by eleven, the hand generator's ten values space themselves out at identical intervals and average exactly 0.5000, and that kind of tidiness on ten draws is the opposite of what unpredictability delivers.

The evenness is worth sitting with, and it inverts the instinct. Perfect evenness feels like a good report card. Perfect evenness is the opposite. Ten numbers from a genuinely unpredictable source arrive with clumps and gaps, and an average of exactly one half would be astonishing. The lower line in the figure is what ten draws are supposed to look like: four bunched near the left, a long bare stretch through the middle, and no two gaps alike. The hand generator is too tidy to be mistaken for unpredictable, and it is exactly that tidiness that a short period produces.

So what does a short period actually cost? Asked for eleven numbers, the hand generator makes the eleventh a repeat of the first. Asked for a hundred, it returns ten copies of the same ten numbers. Anything computed on those hundred numbers is a statement about ten numbers dressed up as a statement about a hundred, and every measure of how uncertain the answer is comes out far too confident, counting a hundred pieces of evidence where only ten exist.

The stated generator solves this in the least clever way available: the same two steps, at a size where the problem cannot arise. Its multiplier 16,807 is seven multiplied by itself five times. Its modulus 2,14,74,83,647 is two multiplied by itself thirty one times, less one, and it is a prime numberA whole number above one that divides evenly by nothing except one and itself.. The multiplier turns out to be a primitive rootA multiplier that touches every non zero value before it comes back to where it began. It is what makes a loop as long as it can possibly be rather than a short one hiding inside a large modulus. of that modulus, which is the technical way of saying its ring is as long as the modulus allows: 2,14,74,83,646 values before anything repeats.

THE SAME RULE, TWO SIZES OF RING THE HAND GENERATOR back at the start after 10 steps ten values, and the eleventh is a repeat THE STATED GENERATOR back at the start after 2,14,74,83,646 steps the longest run in these notes the red wedge is drawn nearly six times wider than it truly is
The stated generator comes back to its start only after 2,14,74,83,646 values, so the longest run anywhere in these notes covers about one seven hundredth of its ring and never reuses a number.

Put a size on that. The busiest run in these notes draws twelve numbers for each of 2,56,000 paths, or 30,72,000 numbers in total. Against a period of 2,14,74,83,646 that is roughly one seven hundredth of the way round the ring. There is no realistic chance of the run wrapping and quietly reusing values. A rule this simple stays worth using once it is scaled up for exactly that reason.

Try it out

The hand generator's ten values average exactly 0.5000 over a whole loop, from every seed, with no variation at all. Is that a point in its favour?

Try it out

Two colleagues run the stated generator, one from a seed of 12345 and one from 12346. Commit to both halves before reading on: how alike will their first drawn numbers be, and how alike will their second ones be?

What happens when two people pick starting numbers one apart?

Run from a seed of 12345, the stated generator, multiply by 16,807 and take the remainder on 2,14,74,83,647, produces 0.096617, then 0.833995, then 0.947702. Run from a seed of 12346, it produces 0.096624, then 0.965532, then 0.703308.

Look at the first pair. The two numbers agree to four decimal places. Now look at the second. The second pair agrees on nothing. Moving one along in the starting number is not a small adjustment to a run, and the near match on that opening number is a real blemish in a rule this plain rather than a charming quirk.

The reason is one line of arithmetic, and it is worth doing rather than believing. 12345 multiplied by 16,807 is 20,74,82,415. 12346 multiplied by 16,807 is 20,74,99,222. Both are smaller than 2,14,74,83,647, so neither is touched by the remainder step at all, and the two results differ by exactly 16,807. Divided by the modulus, that difference is 0.0000078, about one part in 1,27,773. The first draw from neighbouring seeds is nearly identical because at the first step the rule has not yet had a chance to wrap around, and wrapping around is the only thing that separates anything.

From the second step onward it does wrap, and the two runs part company completely. The split is worth watching, and it kills two beliefs at once. The first belief is that neighbouring seeds give neighbouring runs, false from the second number onward. The second belief is that neighbouring seeds give completely different runs, false at the first number. Neither is true, and there is no simple relationship to fall back on.

TWO SEEDS ONE APART, THREE DRAWS IN 0.0 1.0 THE MONTHLY CHANGE THIS READS OFF AS minus 9.00 minus 4.00 1.00 6.00 11.00 1st draw 2nd draw 3rd draw 0.833995 0.965532 0.947702 0.703308 0.096617 and 0.096624 apart by 0.0000078, one part in 1,27,773 Solid line from a seed of 12345. Dashed line from a seed of 12346.
First numbers of 0.096617 and 0.096624 sit on top of each other to four decimal places, while the second numbers, 0.833995 against 0.965532, have nothing in common at all.

The stretches drawn on the right of that figure are how a drawn number becomes a monthly changeThe per cent a price moves over one month, up or down. It is what a drawn number is turned into once a simulation has it, and how that turning is done is covered separately. for the Nakshatra unit, an invented traded unit used throughout these notes. Notice what those stretches do to the first pair: 0.096617 and 0.096624 both land in the same one, so both runs open on a monthly change of minus 4.00 per cent. The two runs are identical for a whole month before they diverge, and then they diverge into different stretches at the second draw and again at the third.

Try it out

Somebody proposes rerunning the identical model from a fresh starting number and treating the second answer as an independent check on the first. Which of these has the exercise actually measured?

Investment Banking Analyst Bootcamp — Fin Maverick

What does random enough mean when a rule makes every number?

If the numbers are produced by a rule, the word random cannot mean unpredictable, so it has to be given a working meaning. The working meaning is this: a run passes when it stands up to the same examinations a genuinely unpredictable one would be put through. Three of those tests matter more than the rest, and all three can be applied to the hand generator in the head.

The first test is share. Does every stretch of the line from zero to one get roughly the number of values its width deserves? The hand generator passes this one and then some. The spacing is suspiciously perfect, and that perfection is the failure described above.

The second test is memory. Having seen one number, is an observer any better placed to name the one after it? Here the hand generator collapses completely. Once a 7 has appeared, the next number is a 5 without any doubt, and that is true at every position, in every run, for ever. Nine values in, the tenth is known. Memory is the test a small generator cannot survive, and it is not a matter of degree: the information is total.

The third test is length. Will the run repeat inside the job it is about to be given? Asked for a hundred numbers, the hand generator repeats ten times over. Asked for the 30,72,000 numbers the busiest run in these notes needs, the stated generator does not repeat, with a factor of about seven hundred to spare.

So the honest defence of the stated generator has nothing to do with unpredictability. The defence is that it passes the three tests at the scale anything actually asks of it, while a rule of the same shape with a modulus of 11 fails the second and third outright. Random enough means exactly that: a claim about fitness for a job rather than a claim about the nature of the numbers. Formal statistical tests push much harder on all three questions, and running those tests properly is its own subject.

One boundary is worth marking off firmly. None of this reaches randomness built to resist an opponent, the kind that protects keys. Adversarial randomness sits under separate requirements entirely, and a rule whose whole run can be rebuilt from one number is precisely the wrong instrument for it. Neither rule described here should be carried anywhere near it.

Try it out

The hand generator fails one of the three tests badly while the stated generator passes it. Name the test and say what fails, using two of the ten values.

Reading an Option Payoff — free micro-course from Fin Maverick

What does somebody re-running the work actually need?

Reproducibility is where this arithmetic meets a desk. Somebody has produced a simulated result. Six months later a lender wants to see it again, or an analyst inherits the workbook, or a colleague wants to build on it. Which four facts have to have been written down for the second person to get the identical answer?

Four things, and they fit on one line. The rule. The starting number. How many numbers were drawn. And the order those numbers were used in.

ONE LINE OF A RUN LOG THE RULE multiply by 16,807, remainder on 2,14,74,83,647 THE STARTING NUMBER 12345 HOW MANY DRAWN 1,20,000 THE ORDER THEY WERE USED IN path by path, month 1 to month 12 usually left blank Three of the four get written down as a matter of habit. The fourth is the one that decides whether anybody can actually get the answer back.
Shuffle which drawn number goes to which month and the identical numbers produce a different result, so a log missing its fourth field cannot be replayed even when its starting number is right there.

The first three get written down almost by reflex. The fourth is the one people forget, and it is the one that quietly breaks things. Feed the identical numbers to the identical model in a different order and the result moves, so a log carrying the rule and the starting number but not the routing will not bring the answer back.

Picture a queue at a ration shop where the shopkeeper serves people in the order they arrive. Same people, same stock, same shop. Change the order of the queue and the last few get something different. Stock left over depends on who came earlier in the line. A simulated run is that queue. If the first drawn number went to the first month of the first path in one version and to the first month of every path in another, the numbers drawn were identical and the result is not.

An analyst or a lender asking for a reproducible result is asking for exactly those four fields. Not the answer, and not a promise about the method. Four fields, one line, and enough discipline to fill in the fourth.

Try it out

Name the four things a run has to record if somebody else is going to get the identical answer back.

The failure: two seeds one apart, called an independent check

Two people on the same desk are told to run the model separately so that each result checks the other. One picks a seed of 12345. The other picks 12346. Sitting next door to somebody else's number feels like the plainest way to be visibly not copying them.

Their first drawn numbers are 0.096617 and 0.096624. Both numbers agree to four decimal places and read off the same monthly change of minus 4.00 per cent, so the two runs open identically. Their second numbers, 0.833995 and 0.965532, read off as 6.00 and 11.00 per cent, and from there the two runs share nothing.

Between them they have built neither a check nor a comparison, only two arbitrary runs standing in a relationship nobody in the room is able to describe. When the two answers come out different, and they will, nobody can say whether the difference means anything. Is the method sensitive? Is one of them wrong? Is this ordinary drift? There is no way to tell, and the exercise that was supposed to create confidence has created an argument instead.

The fix is not a better seed. The fix is to stop treating the seed as a variable worth changing. An independent check varies the shape drawn from, or the method, or the data, and holds the seed fixed, so any difference observed is caused by the one input that changed. Varying the seed measures exactly one thing: how far a run wanders on its own when nothing of substance has moved. Measuring that wander is occasionally worth doing, and it is never a check on anybody's work.

Covered separately. Everything a simulation goes on to do with these numbers is covered separately, along with the step that turns a drawn number into a monthly change. The discipline of declaring a starting number before a run rather than after seeing the answer is covered separately as well, and that is where the reporting rules live. Randomness built to resist somebody guessing it, for keys or for anything an opponent would want to reconstruct, sits under a separate set of requirements. The formal statistical tests of a run are named above and carried out elsewhere.

Different seeds give neither a check nor a comparison. See what the work needs.

How can each of these claims be disproved?

Whole number arithmetic answers to no regulator, no exchange and no published series. Every claim made for the two rules can be settled by doing the arithmetic instead, and each row below names the working that one takes.

The claimHow it is checkedWhat checking it takes
Seven times a number, remainder on eleven, from a start of 1 gives 7, 5, 2, 3, 10, 4, 6, 9, 8, 1 and then begins againDo the ten multiplications in orderA pen and ten lines of working
All ten starting numbers give ten orderings of that same set of valuesRepeat those ten lines nine more times, once from each startA pen and a quiet half hour
Dividing the ten values by eleven and averaging gives exactly one half1 to 10 add to 55, then divide by 10 and by 11One line
16,807 is seven multiplied by itself five times, and 2,14,74,83,647 is two multiplied by itself thirty one times, less oneMultiply both outA calculator holding ten digits
Seeds 12345 and 12346 give first numbers 0.096617 and 0.096624, differing by exactly 16,807 before the divisionMultiply each seed by 16,807 and confirm both products sit below the modulus, so the remainder step leaves them aloneTwo multiplications and one subtraction
2,14,74,83,647 divides by nothing but one and itself, and 16,807 touches every non zero value before returningTrial division for the first, and a check against each of the prime factors 2, 3, 7, 11, 31, 151 and 331 for the secondA short script; neither number is worth taking on trust

The Nakshatra unit and the fifty month record behind it are invented.
Educational material. Not advice on any investment, tax, budget or market position.

Covered in this topic

Subtopics

Random Seed
← 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.