
Explore the fundamentals of stock markets, bonds, yields, and risk management using Python. Learn portfolio theory, capital asset pricing model, Black-Scholes, stochastic calculus, delta hedging, and Python implementations with NumPy.
Python offers high readability and easy learning for quantitative finance. Its rich libraries for scientific computing and machine learning—SciPy, scikit-learn, Keras, TensorFlow—enable fast implementations.
Analyze how financial models use historical data to learn parameters, reveal static limitations, and motivate dynamic, non-linear approaches with machine learning and the black Shwartz formula.
Learn to download and install Python from python.org on Windows, run the installer, and update the path using environment variables to verify Python 3.11 is accessible.
Install Python and set up PyCharm, download the community version, and configure the IDE to create a new Python 3.11 project. Run a sample program to print hi.
Explain the time value of money and why present value and future value differ. Use discrete and continuous models with interest rates and time to compute values.
Implement present and future value calculations in Python, using discrete and continuous compounding to illustrate the time value of money and why continuous yields higher returns.
Explore the five asset classes—stocks, bonds, currency, commodity, and real estate—and understand their risk, return, and role in diversification.
Explore stocks, shares, and equity as ownership in companies, how exchanges and brokers connect investors, and how price movements reflect supply and demand, risk, and dividends.
Learn how stock exchanges match buyers and sellers through brokers, while clearing houses and depositories guarantee settlements and reduce counterparty risk; otc markets carry higher risk.
Explore commodities such as oil, gold, and natural gas, their volatility, and how futures contracts and brokers enable access directly or via commodity-related stocks to hedge inflation and diversify portfolios.
Explore the decentralized over-the-counter forex market and how broker-dealers quote currencies without a public order book, while exchange rates reflect demand, supply, and arbitrage opportunities.
Explore long and short positions, showing profits from rising prices for longs and falling prices for shorts, with short selling borrowed stock and unlimited risk in bear and bull markets.
Learn how bonds function as debt investments, including zero coupon and coupon bonds, principal amount, discounting, and pricing with the market interest rate.
Explore yields and yield to maturity by equating the bond's coupon payments and principal to its price. Learn discounting, continuous modeling, and why longer maturities carry higher yields.
Explore how market interest rates inversely affect bond prices, with higher rates lowering prices and present-value calculations driving this relationship for zero coupon and coupon bonds, informing monetary policy.
Learn how Macaulay duration measures how long it takes for a bond's cash flows to repay the investment and signals its interest-rate sensitivity for zero-coupon and coupon bonds.
Explore the three key bond risks: interest rate risk, default risk, and inflation risk, and how they impact bond prices, coupon payments, and portfolio decisions.
Discover how government bonds fund public spending and how central banks use open market operations to influence monetary policy, money supply, and interest rates.
Explore the fundamental differences between stocks and bonds, highlighting ownership versus debt, voting rights, dividends, risk levels, and how interest rates impact bonds while stocks remain independent.
Learn the mean or expected value of a random variable, then define variance and standard deviation, and explain covariance and correlation to show how two variables move together.
Learn how modern portfolio theory and the Markowitz model use diversification to build a multi-asset portfolio that reduces risk by balancing mean returns and variance.
Apply the mathematical formulation of modern portfolio theory to long-only portfolios across four stocks. Use historical data, weights, and returns to maximize return for a given risk.
Compute the portfolio's expected return by weighting stock returns with the mean mu, using historical data in modern portfolio theory. This approach identifies the most efficient portfolio.
Compute portfolio risk with variance and covariance, using a covariance matrix whose diagonal holds variances, supporting diversification toward the efficient portfolio via weights.
Explore the efficient frontier in modern portfolio theory using Monte Carlo simulations to compare portfolios by return and risk, identify optimal portfolios, and understand the risk-return tradeoff.
Assess investments using the Sharpe ratio, which measures excess return over the risk-free rate per unit of portfolio volatility, guiding you toward the optimal portfolio on the efficient frontier.
Learn how the capital allocation line blends a risky portfolio with risk-free assets, highlighting lending, borrowing, and the tangent to the efficient frontier for the highest Sharpe ratio.
Fetches historical stock data from Yahoo! Finance for Apple, Walmart, Tesla, GE, Amazon, and Deutsche Bank; builds a pandas data frame for Markovits model optimization to maximize the Sharpe ratio.
Implement the Markowitz model II by computing log daily returns, handling undefined values, and annualizing mean and covariance; derive portfolio return and volatility from weights.
Generate ten thousand random portfolios, normalize weights to sum to one, compute portfolio mean and volatility, and visualize the efficient frontier to identify the highest Sharpe ratio portfolio.
Implement portfolio optimization to maximize the Sharpe ratio by optimizing weights with constraints. Calculate portfolio return and volatility from weights and returns, ensuring sums to one and weights in [0,1].
Implement Markowitz portfolio optimization to maximize the Sharpe ratio, using Yahoo data and log returns, generate thousands of portfolios, and reveal the optimal weights, return, and volatility.
Explore the distinction between unsystematic and systematic risk within the capital asset pricing model, and how diversification reduces specific risk in a Markovits-style portfolio, while beta measures market risk.
Apply the capital asset pricing model to relate expected return to the market premium via beta and the risk-free rate, highlighting systematic risk.
Explore the beta parameter in the capital asset pricing model, showing how portfolio risk relates to the market and how to compute portfolio beta with weights that sum to one.
Learn how linear regression links a dependent variable to explanatory variables, with simple and multiple regression illustrated by house prices, and assess with mean squared error and r-squared.
Learn how the capital asset pricing model connects with linear regression, deriving alpha and beta from market-return data. Beta captures systematic risk, while alpha measures return deviation.
Explore capital asset pricing model implementation in Python by downloading IBM and S&P 500 data from Yahoo Finance, plotting results, and estimating beta and alpha from adjusted closing prices.
Compute the capital asset pricing model (CAPM) beta for IBM relative to the S&P 500 using monthly returns, after downloading data, reshaping to monthly, and building the covariance matrix.
Apply linear regression to stock and market returns (S&P 500) to estimate alpha and beta, then compute the expected return using the capital asset pricing model.
Analyze whether daily stock returns follow a normal distribution by downloading IBM data (2010–2020), computing returns, plotting a histogram, and comparing with a normal curve while noting fat tails.
Explore derivatives and how their value depends on an underlying asset, including forwards, futures, swaps, and options, and how they hedge risk and enable speculation across asset classes.
Learn how leverage amplifies gains and losses in the stock market, and how brokers, margins, initial and maintenance margins, and margin calls govern leveraged trades such as futures and options.
Master Quantitative Finance with Python
Turn mathematics, statistics, and programming into powerful tools for understanding—and modeling—the financial world.
If you’ve ever wondered how professionals price options, manage portfolio risk, or build financial models used on Wall Street, this course will guide you step by step through the foundations of financial engineering using Python.
In this course, you won’t just learn theory—you’ll implement real financial models in Python, gaining practical skills that quantitative analysts, traders, and financial engineers use every day.
You’ll start with the building blocks of financial markets, including stocks, bonds, and derivatives. From there, we move into the mathematical models that revolutionized modern finance—from portfolio optimization to option pricing.
Along the way, you’ll discover some of the most influential ideas in financial science, including:
Bond pricing and interest rate concepts
Modern Portfolio Theory and the Markowitz model
The Capital Asset Pricing Model (CAPM)
The Black–Scholes model, one of the most elegant breakthroughs in 20th-century finance
Risk management techniques such as Value-at-Risk
Monte Carlo simulations for pricing and risk analysis
You’ll also explore how randomness shapes financial markets through stochastic processes, Brownian motion, and Ito’s calculus, and learn how these ideas are used to model asset prices.
By the end of the course, you’ll understand how quantitative finance works both theoretically and computationally, and you’ll be able to build and implement these models yourself in Python.
Important: This course is designed for learners who are genuinely interested in mathematics, statistics, and analytical thinking. If you enjoy working with numbers, models, and coding, you will find this journey incredibly rewarding.
What You’ll Learn
Section 1 – Introduction
Installing Python
Why Python is one of the most powerful tools in finance
The challenges of financial modeling and historical data
Section 2 – Stock Market Basics
Present value and future value of money
Stocks and equity markets
Commodities and the FOREX market
Long and short positions explained
Section 3 – Bond Theory and Implementation
What bonds are and how they work
Yield and yield to maturity
Macaulay duration
Bond pricing theory and Python implementation
Section 4 – Modern Portfolio Theory (Markowitz Model)
Diversification in finance
Mean–variance optimization
Efficient frontier and Sharpe ratio
Capital Allocation Line (CAL)
Section 5 – Capital Asset Pricing Model (CAPM)
Systematic vs. unsystematic risk
Beta and alpha
Linear regression and market risk
Why market risk is the most relevant risk
Section 6 – Derivatives Basics
Introduction to derivatives
Options: calls and puts
Forward and futures contracts
Mark-to-market mechanism
Credit Default Swaps (CDS)
Interest rate swaps
Section 7 – Random Behavior in Finance
Randomness in financial markets
Wiener processes
Stochastic calculus and Ito’s Lemma
Brownian motion theory and implementation
Section 8 – Black-Scholes Model
Black-Scholes theory and implementation
Monte Carlo simulations for option pricing
The Greeks and risk sensitivities
Section 9 – Value-at-Risk (VaR)
Understanding Value-at-Risk
Monte Carlo simulation for risk estimation
Section 10 – Collateralized Debt Obligations (CDO)
What CDOs are
Lessons from the 2008 financial crisis
Section 11 – Interest Rate Models
Mean-reverting stochastic processes
The Ornstein–Uhlenbeck process
The Vasicek interest rate model
Bond pricing with Monte Carlo simulation
Section 12 – Value Investing
Long-term investing strategies
The Efficient Market Hypothesis
Whether you want to become a quantitative analyst, improve your financial modeling skills, or simply understand the mathematics behind modern finance, this course will give you the tools to do it.
Join now and start building real financial models with Python today.