Hey. I'm TJT-Pro. Ex-medic, short-term trader, self-taught developer, and somewhere along the way, a math enthusiast who couldn't leave it alone.
Medicine teaches you not to trust a symptom until you understand the mechanism underneath it. I got fascinated with patterns 2 years ago, watching markets move and noticing they weren't random so much as structured, if you looked at the right timescale. That fascination turned into my own recursive time framework for tracking where big money is probably already moving before price confirms it. Somewhere in building that out, the trader in me turned into someone who wanted to understand markets as a mathematical object, not just a chart.
This repository is what that curiosity became, and it's my give-back for it: derive the mathematics myself, implement it from the definition, verify it against NumPy/SciPy/statsmodels so I can't fool myself, then run it against one real dataset -- daily EUR/USD exchange rates from the Federal Reserve, 1999-01-04 to 2026-08-21 -- and see what actually survives contact with real data.
No NumPy or SciPy inside any implementation here. They appear only as the check that the from-scratch version is right.
2,247 tests. 30 projects. One dataset.
Together, these 30 projects make up Quant From First Principles -- derive it, implement it, verify it, apply it to real data. The foundational curriculum lives in the repository of that name; the more advanced projects built on top of it are each published as their own repository, listed below.
Yours: TJT_Pro on TradingView
The foundational curriculum lives in quant-from-first-principles: 14 projects, phase 1 through 5 -- discrete math and probability, statistics and inference, decision theory and risk, calculus, linear algebra and optimization. 913 tests.
Sixteen more advanced repositories built on that foundation, published independently so each is a complete, discoverable piece of work on its own. Publishing is in progress in the order listed under each repository's own README; a link that 404s just means it isn't live yet.
Stochastic calculus & derivatives
- stochastic-processes -- random walks, Markov chains, Poisson processes, Brownian motion, martingales, first-passage times
- stochastic-differential-equations -- Euler-Maruyama, Milstein scheme, Ito's lemma
- black-scholes -- closed-form pricing, Greeks, implied volatility, binomial trees, Monte Carlo pricing
Numerical & computational methods
- automatic-differentiation -- dual numbers, forward mode, reverse-mode autodiff, backpropagation
- ode-engine -- Euler methods, RK4, adaptive step-doubling
- fourier-analysis -- DFT, Cooley-Tukey FFT, convolution, periodograms
- numerical-pde -- finite differences, von Neumann stability, the Black-Scholes PDE
- quasi-monte-carlo -- van der Corput and Halton sequences, discrepancy measures
Inference & learning from data
- time-series-mathematics -- ACF/PACF, AR/MA/ARMA, Yule-Walker, ADF stationarity testing
- bayesian-inference -- conjugate priors, grid approximation, Metropolis-Hastings MCMC
- hidden-markov-models -- forward-backward algorithm, Viterbi, Baum-Welch
- information-theory -- entropy, KL divergence, mutual information, Huffman coding
- svd-from-scratch -- singular value decomposition, pseudoinverse, condition numbers
Quant finance engineering
- convex-optimization -- Newton's method, projected gradient descent, KKT/duality
- portfolio-mathematics -- Markowitz frontier, CAPM, Kelly criterion
- model-risk -- VaR backtesting, AIC/BIC, backtest overfitting demonstration (the capstone)
Most quantitative code hides its mathematics behind a library call. That's the right call in production. It's the wrong call if the goal is to understand what the library is actually computing. The goal was never to replace NumPy or SciPy -- it was to earn the right to use them.