
Explore how Python powers financial analysis with easy learning, extensive libraries, and cross-platform flexibility, enabling data analysis, machine learning, and open-source collaboration in finance.
Gather and preprocess high-quality financial data, convert prices to returns, and visualize time series. Examine stylized facts of asset returns and how data source differences affect analyses.
Learn to download data from a data provider using a Python library by creating an account, authenticating with an API key, and fetching datasets with daily to annual frequencies.
Transform prices into returns to achieve stationarity in financial time series, then compute simple and log returns, and adjust for inflation using CPI and Quandl data.
Explore changing frequency by transforming log returns and volatility across time periods, and learn to compute realized and annualized volatility using daily and monthly data, with a practical Apple example.
Visualize time series data by combining pandas with Cufflinks and Plotly to create interactive, multi-axis plots of stock prices, simple returns, and log returns in Jupyter.
Create a candlestick chart from finance data, adding volume and a 20-period moving average based on the close, and compare simple versus exponential moving averages.
Apply Bollinger bands using a 20-day moving average and two standard deviations to trigger buys on lower band crosses and sells on upper band crosses, Microsoft 2018 with 0.1% commission.
Learn to implement a 14-day RSI trading strategy in python, going long when RSI crosses below 30 and short when RSI crosses above 70, with exits at 50, tested.
Learn to build an interactive TA dashboard in Jupyter Notebook using AI Python and cufflinks, with selectors for assets and indicators like Bollinger Bands and RSI, enabling dynamic charts.
Explore the basics of time series modelling, including decomposition, testing for stationarity, and achieving stationarity, and learn to fit and forecast with exponentially smoothing methods and array modulus models.
Decompose time series to reveal level, trend, seasonality, and noise, compare additive and multiplicative models, and use rolling statistics and seasonal decomposition to guide modeling.
Explore exponential smoothing methods for non stationary data, including simple exponential smoothing and Holt’s damped trend models for stock price forecasts.
Model time series with arima class models, using auto regressive, integrated, and moving average components to achieve stationarity, select orders with auto_arima, and assess residuals with Ljung-Box and AIC.
Forecast using ARIMA class models to compare time series predictions of Google's stock prices from 2015–2018 and forecast early 2019 with two model variants.
Learn to implement the capital asset pricing model (capm) in Python, estimate the coefficients and intercept from monthly returns using Yahoo Finance data, and assess market risk via linear regression.
Implement the Fama-French three-factor model in Python by loading five years of Facebook monthly returns, computing excess returns, and estimating market, SMB, and HML factors via regression.
Implement rolling three-factor model on a 60-month, equal-weighted portfolio, using Python with pandas datareader and yfinance to estimate returns and interpret a near-zero intercept.
Implement four- and five-factor models in Python to analyze stock returns, using momentum, profitability, and investment factors with market, SMB, HML, RMW, CMA; guide data import to OLS regression.
Introduction to volatility modeling in time series using ARCH and GARCH frameworks, addressing volatility clustering and applications in risk management, options pricing, and multivariate models like CCC and DCC.
Explore implementing a CCC-GARCH framework for multivariate volatility forecasting by estimating univariate GARCH models and a constant conditional correlation matrix from stock returns.
Estimate univariate GARCH models for volatility and apply DCC with correlation targeting to forecast correlations. Integrate R and Python in a Jupyter notebook to compare DCC with CCC Ghosh models.
Simulate stock price dynamics using geometric Brownian motion to forecast Microsoft's stock prices one month ahead, estimating drift and diffusion from training data and applying antithetic variance reduction for accuracy.
Price American options with least squares Monte Carlo by estimating continuation values through regression on simulated paths, enabling early exercise decisions and option premium estimation.
Estimate one-day value-at-risk for a two-asset portfolio (Facebook and Google) using Monte Carlo simulations, incorporating returns, correlations, and random normal variables to derive the VaR percentile.
Explore asset allocation using modern portfolio theory and mean-variance analysis to balance risk and reward, diversify portfolios, and optimize for an efficient frontier via Monte Carlo simulation and optimization.
Evaluate the performance of a basic 1/n portfolio by constructing equal weights, computing returns, and generating Pi Folio tear sheets to compare risk and return metrics.
Learn to compute the efficient frontier with SciPy optimization, targeting returns and minimizing volatility, and compare with Monte Carlo results; the volatility-minimizing portfolio centers on Microsoft and Facebook, excluding Twitter.
Explore Mitchell learning for credit default prediction using a binary classification on a Taiwan bank dataset with features like gender, age, education, and repayment history.
Load and explore a dataset in Python, inspect data types, and optimize memory by converting object columns to category while separating features from the target.
Explore data with exploratory data analysis to understand distributions, missing values, and correlations, then create features and compare groups by gender and education to assess defaults.
Learn to handle missing values by identifying missingness types, imputing numeric and categorical features with appropriate strategies (mean, median, mode; per group), and preserving target variable integrity.
Encode categorical features with label encoding or one-hot encoding, avoid the dummy variable trap by dropping a column, and apply a column transformer to train and test data.
Learn how a decision tree classifier splits features to minimize impurity using entropy or Gini, predicts from leaf values, and evaluates with ROC, AUC, and confusion matrices.
Implement scikit-learn pipelines to load data, split into training and test sets, impute missing values, encode categorical features, and train a decision tree classifier, with end-to-end evaluation for reproducibility.
Tune model hyperparameters with grid search and cross-validation to improve generalization. Compare grid search and random search, using training, validation, and test splits and recall for imbalanced data.
Explore advanced tree-based classifiers such as extreme boost and lightgbm, stack models for improved credit default prediction, and study feature importance, handling imbalanced data, and Bayesian hyperparameter optimization on Kaggle.
Discover how advanced classifiers boost financial analysis results by tuning hyperparameters and comparing default versus tuned model performance.
Explore feature importance in financial machine learning: assess model interpretability with random forest, mean decrease in impurity, permutation importance, and drop-column methods to identify top predictors and improve training efficiency.
Explore methods for handling imbalanced data in classification, including undersampling, oversampling, SMOTE variants, and class weights, using a credit card fraud dataset and a baseline random forest.
Explore how deep learning applies to finance by predicting credit card default and forecasting time series with PyTorch, using architectures for sequential data.
Apply deep learning to tabular data in financial analysis using the fastai library, with automatic preprocessing and entity embeddings for categorical features to tackle classification and regression tasks.
Explore multilayer perceptrons for time series forecasting using PyTorch, building and training an MLP with two hidden layers, lag features, scaling, and evaluation against a naive benchmark.
Learn how recurrent neural networks forecast time series by processing data sequentially with a shared memory state, covering vanilla rns, lstm/gru, backpropagation through time, and practical training steps.
In this course, you will become familiar with a variety of up-to-date financial analysis content, as well as algorithms techniques of machine learning in the Python environment, where you can perform highly specialized financial analysis. You will get acquainted with technical and fundamental analysis and you will use different tools for your analysis. You will learn the Python environment completely. You will also learn deep learning algorithms and artificial neural networks that can greatly enhance your financial analysis skills and expertise.
This tutorial begins by exploring various ways of downloading financial data and preparing it for modeling. We check the basic statistical properties of asset prices and returns, and investigate the existence of so-called stylized facts. We then calculate popular indicators used in technical analysis (such as Bollinger Bands, Moving Average Convergence Divergence (MACD), and Relative Strength Index (RSI)) and backtest automatic trading strategies built on their basis.
The next section introduces time series analysis and explores popular models such as exponential smoothing, AutoRegressive Integrated Moving Average (ARIMA), and Generalized Autoregressive Conditional Heteroskedasticity (GARCH) (including multivariate specifications). We also introduce you to factor models, including the famous Capital Asset Pricing Model (CAPM) and the Fama-French three-factor model. We end this section by demonstrating different ways to optimize asset allocation, and we use Monte Carlo simulations for tasks such as calculating the price of American options or estimating the Value at Risk (VaR).
In the last part of the course, we carry out an entire data science project in the financial domain. We approach credit card fraud/default problems using advanced classifiers such as random forest, XGBoost, LightGBM, stacked models, and many more. We also tune the hyperparameters of the models (including Bayesian optimization) and handle class imbalance. We conclude the book by demonstrating how deep learning (using PyTorch) can solve numerous financial problems.