Algorithmic Trading with Python and Google Colab (2)
Teaching a Neural Network to Trade β Session 2 π§ Add neural-network capacity to the predictability question β a 20-member PyTorch probability ensemble trained in Google Colab and benchmarked against OLS, momentum, random, and buy-and-hold baselines. π GitHub repo: https://github.com/yhilpisch/algocolab π Use our community discount code SPECIAL5 when enrolling in any of our programs (5% off). In this second session of our free 3-part webinar series "Algorithmic Trading with Python and Google Colab", Dr. Yves J. Hilpisch asks whether extra model capacity uncovers useful non-linear structure or merely overfits faster β and evaluates once on an untouched test set. π Topics in this session: β’ Runtime and device inspection: variable Colab capacity, CPU vs CUDA memory models β’ Feature engineering with chronological splits and train-only scaling β’ Custom compact (64, 32) feed-forward network: raw logits and BCEWithLogitsLoss β’ Ensemble of 20 predeclared seeds with averaged probabilities β’ Early stopping: patience 10, minimum validation-loss improvement 1e-4, best-checkpoint restore β’ Predeclared 0.50 deployment threshold; wider thresholds as sensitivity diagnostics only β’ Baselines: OLS, momentum, 1,000 random long/short paths, buy-and-hold β’ Idealized immediate-close execution convention and one-bar-delayed robustness check β’ Deterministic CPU cross-asset retrains across all eight frozen-data assets π Resources: π Slides (live session): https://tpq.io/tpq_colab_trading_2.pdf π Slides (updated edition): https://tpq.io/tpq_colab_trading_2_new.pdf π Code & notebooks: https://github.com/yhilpisch/algocolab π TDS: https://thedatascientist.dev π CPF: https://python-for-finance.com π€ TAE: https://theaiengineer.dev βΏ TCE: https://thecryptoengineer.dev π Disclaimer: This content is provided solely for illustration and educational purposes. It does not constitute financial, investment, legal, or professional advice, nor an offer or solicitation to buy or sell any security, financial instrument, or trading strategy. Past performance, whether simulated, backtested, or real, is no guarantee of future results. Algorithmic trading involves substantial risk, including the possible loss of principal capital. No warranties or guarantees of any kind are given. Use at your own risk. #AlgorithmicTrading #PyTorch #DeepLearning #Python #QuantFinance #Finance #NeuralNetwork #Ensemble #GoogleColab #GPU #Backtesting #MachineLearning #Trading #ThePythonQuants