1. Backtesting in Python

    A backtest runs a trading rule over past prices and reports what would have happened: the return, the risk, the number of trades.

    Engineeringpythonbacktesting

  2. Building models with scikit-learn

    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…

    Engineeringpythonmachine-learning

  3. Choosing a model is a systems decision

    Accuracy is one column in the table. Training time, time per prediction and its worst case, whether the model keeps the data, whether it can be explained, how…

    Machine Learning Series 1machine-learningvolatility

  4. The Python stack for machine learning

    Almost all machine learning work is done in Python, through a few dozen libraries that each exist for one kind of job.

    Engineeringpythonmachine-learning

  5. Boosting: models that learn from the last one's mistakes

    Boosting builds a strong model from many weak ones trained in sequence, each focusing on what the previous ones got wrong.

    Machine Learning Series 1machine-learningensembles

  6. Random forests: bagging with one extra rule

    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 Series 1machine-learningensembles

  7. Portfolio optimisation: choosing the weights

    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…

    Quantitative Finance Series 1statisticsportfolio

  8. Bagging: many copies of a model, averaged

    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…

    Machine Learning Series 1machine-learningensembles

  9. Beta and alpha: how much of the market you carry, and what is left

    Plot a stock's daily return against the market's and fit a straight line.

    Quantitative Finance Series 1statisticsrisk

  10. Sharpe, Sortino and information ratio: return per unit of risk

    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…

    Quantitative Finance Series 1statisticsportfolio

  11. What a trade really costs

    A trading idea becomes profit only after paying the bid-ask spread, walking the order book, moving the price and, for a short, borrowing the shares.

    Quantitative Finance Series 1tradingbacktesting

  12. Scoring a model: a number means nothing without a split, a metric and a baseline

    A model's score is meaningless on its own.

    Machine Learning Series 1machine-learningevaluation

  13. Bias and variance: where a model's errors come from

    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…

    Machine Learning Series 1machine-learningoverfitting

  14. Data that lies: the bugs that look like alpha

    Most of the alpha in a backtest is a data bug with a name: a feature that used tomorrow's number, a universe built from today's survivors, a thousand ideas…

    Quantitative Finance Series 1backtestingstatistics

  15. Covariance and correlation: why a mix is safer than its parts

    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…

    Quantitative Finance Series 1statisticsportfolio

  16. Nearest neighbours: predict what similar past cases did

    k-nearest neighbours keeps every training row and, asked about a new case, finds the k most similar old ones and averages their answers.

    Machine Learning Series 1machine-learningvolatility

  17. Why prices are hard to beat: efficiency, random walks and a roulette wheel

    An efficient market is one where no reliable edge survives after costs, because any pattern worth money is traded away by the people who find it.

    Quantitative Finance Series 1statisticstrading

  18. Decision trees: a model made of yes/no questions

    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…

    Machine Learning Series 1machine-learningdecision-trees

  19. Value is an estimate: discounting, growth and the margin of safety

    A price is observed; a value is estimated.

    Quantitative Finance Series 1valuationstatistics

  20. Mean and standard deviation: return and risk in two numbers

    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…

    Quantitative Finance Series 1statisticsreturns

  21. Returns compound: multiply, never add

    Returns chain by multiplying growth factors, not by adding percentages, and that one fact explains why +50% then −50% loses money, why a five-year gain is not…

    Quantitative Finance Series 1statisticsreturns

  22. Every feature has a timestamp: leakage, scaling and twin features

    For every feature a model uses, ask when its value became knowable and whether you could compute it live.

    Machine Learning Series 1machine-learningvolatility

  23. Linear regression: the first model, a straight line

    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…

    Machine Learning Series 1machine-learningregression

  24. Expected value: what a risky choice is worth on average

    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…

    Quantitative Finance Series 1statisticsprobability

  25. Regression vs classification: predicting a number or a label

    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).

    Machine Learning Series 1machine-learningvolatility

  26. Probability: how often something happens

    A probability is a number between 0 and 1 that says how often something happens in the long run.

    Quantitative Finance Series 1statisticsprobability

  27. The data is part of the model: splits, gaps and outliers

    Which rows a model trains on, how the test rows are chosen, what is done about missing values, and how far one wild value can pull a fit all change the result…

    Machine Learning Series 1machine-learningvolatility

  28. What machine learning is: rules learned from examples

    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…

    Machine Learning Series 1machine-learningfraud

  29. Machine learning for quantitative finance in ten ideas

    Ten ideas carry machine learning for finance: the target decides the problem, the data is part of the model, a linear model is a weighted sum, every feature has…

    Machine Learning Series 1machine-learningensembles

  30. What is quantitative finance?

    Quantitative finance is the practice of making investment and risk decisions from measured numbers and tested rules rather than judgement alone.

    Quantitative Finance Series 1quantitative-financecareers

  31. Quantitative finance in ten ideas

    Ten ideas carry most of quantitative finance: returns multiply, a return means little without the risk taken to earn it, correlation decides how much risk…

    Quantitative Finance Series 1statisticsportfolio

  32. Letting my homelab do things on its own

    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.

    homelabagentshermes

  33. Switching to a smaller model

    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.

    homelabllmself-hosting

  34. Setting up my homelab

    I wanted my own private AI, running at home, where nothing I ask leaves the house.

    homelabllmself-hosting