Backtesting in Python
OCT 15 2026 · 14 min
A backtest runs a trading rule over past prices and reports what would have happened: the return, the risk, the number of trades.
Building models with scikit-learn
OCT 15 2026 · 13 min
scikit-learn is one interface, fit and predict, wrapped around every classical machine-learning method, plus the scaffolding that turns a model into a result…
The Python stack for machine learning
OCT 15 2026 · 13 min
Almost all machine learning work is done in Python, through a few dozen libraries that each exist for one kind of job.
Boosting: models that learn from the last one's mistakes
OCT 14 2026 · 10 min
Boosting builds a strong model from many weak ones trained in sequence, each focusing on what the previous ones got wrong.
Random forests: bagging with one extra rule
OCT 12 2026 · 8 min
A random forest is bagging with one extra rule: at every split, each tree may only choose from a random handful of the features.
Machine learning for trading in ten ideas
OCT 11 2026 · 22 min
Ten ideas carry the machine-learning half: the target decides the problem, the data is part of the model, every feature has a timestamp, a linear model is a…
Quantitative finance in ten ideas
OCT 10 2026 · 26 min
Ten ideas carry most of quantitative finance: returns multiply, risk scales with the square root of time, correlation decides how much risk cancels, an…
Portfolio optimisation: choosing the weights
OCT 9 2026 · 8 min
Portfolio optimisation chooses how much to put in each asset so that, for the risk you accept, the expected return is as high as possible; it works because…
Bagging: many copies of a model, averaged
OCT 6 2026 · 7 min
Bagging trains many copies of the same model, each on a slightly different random resample of the data, and averages their answers; the copies make different…
Sharpe, Sortino and information ratio: return per unit of risk
OCT 4 2026 · 10 min
A return on its own means little until you know the risk taken to get it; these three ratios divide extra return by risk, and they differ only in what they…
Bias and variance: where a model's errors come from
SEP 30 2026 · 7 min
A model's error on new data comes from three places: bias (it is too simple to capture the real pattern), variance (it changes too much depending on which data…
Covariance and correlation: why a mix is safer than its parts
SEP 27 2026 · 9 min
Covariance and correlation measure whether two things tend to move together; in a portfolio, that one number decides how much of the risk cancels out, which is…
Decision trees: a model made of yes/no questions
SEP 22 2026 · 8 min
A decision tree makes a prediction by asking a short series of yes/no questions about the input, like a flowchart an expert would draw; it learns which…
Mean and standard deviation: return and risk in two numbers
SEP 19 2026 · 9 min
The mean tells you where the middle of your data is, and the standard deviation tells you how far a typical value strays from that middle; in finance the first…
Linear regression: the first model, a straight line
SEP 14 2026 · 10 min
Linear regression draws the straight line that best fits your data, where "best" means the total of the squared misses is as small as possible; each number it…
Expected value: what a risky choice is worth on average
SEP 11 2026 · 9 min
Expected value is the average result you would get if you could repeat a risky situation many times: multiply each possible outcome by its probability and add…
Regression vs classification: predicting a number or a label
SEP 8 2026 · 7 min
Most machine learning answers one of two questions: "how much?" (regression, the answer is a number) or "which one?" (classification, the answer is a category).
Probability: how often something happens
SEP 5 2026 · 10 min
A probability is a number between 0 and 1 that says how often something happens in the long run.
What machine learning is: rules learned from examples
SEP 1 2026 · 5 min
Machine learning is teaching a computer by example instead of by instruction: you show it many past cases with the right answers, it works out the pattern on…
What is quantitative finance?
AUG 31 2026 · 11 min
Quantitative finance is the practice of making investment and risk decisions from measured numbers and tested rules rather than judgement alone.
Letting my homelab do things on its own
AUG 29 2026 · 5 min
A chat window only answers when I ask. I wanted my homelab to also do small jobs for me on its own, so I tried two AI agents, OpenClaw and Hermes Agent.
Switching to a smaller model
AUG 20 2026 · 4 min
I expected a new, smaller model to be slower on my homelab, and at first it was. Then I found one setting that more than doubled its speed.
Setting up my homelab
AUG 16 2026 · 5 min
I wanted my own private AI, running at home, where nothing I ask leaves the house.