
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.
Assess financial analysis to evaluate stability, solvency, liquidity, profitability; review income statements, balance sheets, cash flows; apply fundamental and technical analysis, ratios, intrinsic value, forecasting for asset allocation.
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.
Download historical stock prices from Yahoo Finance using the yfinance library, for Apple and other tickers, including dividends and splits, and inspect the dataframe with open, high, low, close, volume.
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.
Identify outliers in financial data by applying a three-sigma rule on 21-day moving averages and standard deviations to Apple stock returns, then plot and treat them by capping or replacing.
Explore stylized facts of asset returns using daily S&P 500 data from 1985–2018, revealing non-Gaussian heavy-tailed distributions, volatility clustering, absence of return autocorrelation, and a leverage effect.
Explore technical analysis in Python by visualizing candlestick charts, implementing moving averages and RSI indicators, backtesting trading strategies, and building an interactive Jupyter dashboard.
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.
Backtest a 20-day moving average strategy in Python using the back trader framework, evaluating long-only trades, indicators, signals, and performance metrics on historical data.
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.
Assess time series stationarity using ADF and KPSS tests, plot rolling mean and std, and interpret p-values against critical values to decide if the gold price from 2000–2011 is stationary.
Explore correcting nonstationary time series by applying deflation with CPI, log transformation, and first differences; assess stationarity with ADF tests on inflation-adjusted gold prices.
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.
Explore Python-based multi-factor models to estimate factor models, explain excess returns with risk factors, and build CAPM along with three-, four-, and five-factor models for asset selection.
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.
Explain stock returns volatility with arch models by modeling conditional variance as a function of past residuals, and illustrate end-to-end steps from data download to model fitting.
Explore stock returns volatility by extending arch model to the gottsch garch framework, detailing conditional variances with past variances and lag residuals plus moving average, constraints, and Python estimation.
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.
Monte Carlo simulations in finance to model stock dynamics, price European and American options, and estimate value at risk using repeated random sampling and Python libraries.
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.
Learn to price european options with Monte Carlo simulations under risk-neutral valuation, comparing to closed-form Black-Scholes, discounting payoffs to present value using GBM paths.
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.
Price american options with the Quantum Leap library using Python wrappers and Monte Carlo engines, detailing calendars, day-count conventions, and market data setup.
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.
Explore the efficient frontier with Monte Carlo simulations by building thousands of random portfolios from four U.S. tech companies, computing annualized returns, volatility, covariance, and the Sharpe ratio.
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.
Split data into training and test sets to train on one portion and evaluate on unseen data, using stratification and training-data–only imputation to prevent leakage.
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.
Explore advanced classifiers for credit default prediction, building pipelines with decision trees, random forest, and boosting models, and tune hyperparameters to improve performance amid imbalanced data.
Discover how advanced classifiers boost financial analysis results by tuning hyperparameters and comparing default versus tuned model performance.
Explore stacking in machine learning by combining diverse base learners with a logistic regression meta-learner, using cross-validation to improve recall on credit card fraud data.
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.
Apply bayesian hyperparameter optimization to tune models more efficiently than grid or randomized search, using a surrogate objective and cross-validation to maximize recall in fraud detection.
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.
Explore one-dimensional convolutional neural networks for time series forecasting, learning features with kernels and pooling, transforming series into filter maps to predict stock prices using CNN architectures.
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.