
Explore the full course curriculum for Python-based finance and algorithmic trading with QuantConnect, covering NumPy, Pandas, visualization, financial theory, and the Lean engine.
Navigate course logistics, download notes and Jupyter notebooks zip, and use environment to lock in library versions; seek help via forums, Q&A, and Discord, and contact Udemy support for issues.
Install Python and the Jupyter notebook with the free Anaconda individual edition, add it to your path if needed, then launch Jupyter and prepare the course environment.
Discover a quick overview of how to use Python, with emphasis on working in the Jupyter notebook and the flexibility to use any development environment.
Cover fundamental data types—numbers, strings, dictionaries, lists, tuples, and sets—plus indexing, slicing, string formatting, and comparison of logical operators. Learn control flow, functions, comments, printing, and basic Jupyter notebook workflow.
In part two, practice Python basics: compare operators, logical operators, if/else control flow, for and while loops, range usage, and the basics of list comprehension.
Learn to define Python functions, use parameters and returns, and write docstrings; explore lambda expressions with map and filter. Master common string, dictionary, and list methods, including in checks.
This lecture navigates the Python crash course exercises from the Python for Finance repo, covering tasks on financial data, string and dictionary access, and functions like price and average price.
Showcase Python crash course exercise solutions, covering square roots, string slicing, f-strings, dictionary indexing, and functions for source, price, counting, and averaging.
Explore NumPy, the Python data science library for creating one- and two-dimensional arrays, slicing and indexing, broadcasting, and universal functions for linear algebra, statistics, trigonometry, and random numbers.
Create numpy arrays from Python lists or functions, reshape to 1d or 2d forms, and generate random data with uniform or standard normal distributions, with seeds, shape, and dtype.
Explore NumPy indexing and selection, including single element access, slicing, broadcasting with scalar values, and conditional selection, with two-dimensional array indexing and copy versus view concepts.
Explore numpy operations, including element-wise arithmetic with scalars and arrays, universal functions, and statistics, plus handling division by zero with warnings and nan/inf, using axis to sum rows or columns.
Explore the NumPy exercise notebook, learn to create arrays of zeros, ones, and fives, and note that outputs may differ since no seed is set to avoid overwriting example outputs.
Explore NumPy basics and exercises in Python for finance, including creating zeros and ones, arange and reshape, indexing, linspace, and seed-based random numbers for reproducible results.
Delve into core pandas topics, including series and data frames, conditional filtering, and combining data frames, with basics of reading and writing data for finance datasets.
Explore the pandas series object, a one-dimensional data structure with a labeled index for label-based data access. Create series from lists or dictionaries and learn core properties and indexing.
Create and manipulate pandas series with a labeled index, access by label or position, and perform aligned operations with fill values; note dtype changes and preparation for data frames.
Learn to create pandas data frames from Python objects and numpy arrays, set indexes and columns, and read CSV files with correct file paths in a Jupyter notebook.
Explore pandas data frames by inspecting columns and index, then use head, tail, info, describe, and transpose on a 244-row, 11-column tips data frame.
Learn to retrieve information from pandas data frames by selecting single or multiple columns, create and update columns, and drop columns with axis handling.
Explores managing pandas data frame rows by setting and resetting the index, selecting single or multiple rows with iloc and loc, dropping or appending rows, and making index changes permanent.
Learn to perform pandas conditional filtering on a data frame by column conditions, using boolean series, multi-condition logic with ampersand and pipe, and the is in method.
Explore the pandas apply method by building and applying custom functions to single columns, like extracting the last four digits of credit card numbers, and extend to multi-column inputs.
Learn to apply a function across multiple pandas columns with a lambda and a custom tip-quality check. Compare performance using numpy vectorize for faster execution and axis=1.
Explore pandas essential methods for data frames, describing data, sorting by one or multiple columns, locating max/min indices with idxmax/idxmin, and using value_counts, unique, replace, map, duplicates, and sample.
Learn how to combine data frames in pandas using concatenation, including joining along columns or rows, handling misaligned indices, and preparing for later merge and join ideas.
Master pandas merge to perform inner joins on dataframes, using the how parameter and a common key like name to combine registration and login data.
Learn how left and right merges in pandas combine data frames using the on name key, producing nulls for unmatched rows and why table order matters.
Master pandas outer merge to include all rows from both data frames, handle nulls, and merge on columns or indexes with on, left on, right on, and custom suffixes.
Learn how to read and write csv data with pandas in Python, control headers and indices, and save or load files using the current directory and common IO patterns.
Learn to read HTML tables into pandas data frames with read_html, select and clean the desired table from a webpage or file, and export the data frame back to HTML.
Read excel workbooks as a dictionary of sheets with pandas read_excel, mapping each sheet name to a data frame, then write with to_excel, selecting a sheet and disabling the index.
Learn how pandas connects to SQL engines with a driver and SQLAlchemy, using create_engine and read_sql or read_sql_query to load data frames, including an in-memory SQLite example.
Practice pandas manipulation on the S&P 500 data using the finance exercise notebook and its solutions, including merging datasets, filtering by market cap and dividend yield, and applying price formatting.
Learn pandas workflows for finance: import, explore, drop columns, set index, sort by market cap, filter by dividend yield, merge with constituents, and format prices.
Explore matplotlib fundamentals, including the functional pyplot and object-oriented APIs, to create and customize plots with figures and subplots, and learn to plot equations or data points.
Learn the basics of plotting with the simple plot calls, including labels, axis limits, and saving figures, then transition to the robust object‑oriented figure API.
Explore how the figure object serves as a blank canvas for plotting, with a default size of 432 by 288 pixels, then add axes with add_axes and plot on them.
Learn to create a blank figure, add axes, and plot on them using matplotlib, with multiple axes and zoomed-in inserts. Customize with x/y limits, labels, and titles.
Master figure parameters by adjusting the figure size and dpi for desired resolution, then save with the bounding box inches to include the axes, ensuring clear, correctly sized exports.
Learn to use matplotlib subplots to create multi-plot figures with a figure and axes tuple, index axes by rows and columns, and adjust spacing with tight layout.
Learn how to add legends and labels to Matplotlib visualizations. Explore editing colors, line widths, line styles, and legend location options.
Learn to style matplotlib plots by controlling colors (names, hex, rgb), adjusting line width and styles, and customizing markers (size and edge/face colors) for clearer visuals.
Enhance your plotting skills with advanced matplotlib commands, including logarithmic scales, custom tick labels, dual axes, grids, spines, annotations, and complex subplots, with references to seaborn and the gallery.
Explore plotting with numpy and matplotlib by graphing E = mc^2 across masses and comparing yield curves from 2007 to 2020, including single and dual-axis plots.
Master numpy-based data creation and plotting mass versus energy with E=mc^2, then practice matplotlib techniques for legends, subplots, twin axes, and log-scale yields.
Master pandas time methods for date-time indexed data and visualize finance data with plots and map plot live, covering series insights, moving averages, time shifts, percentage changes, and api access.
Master core pandas time methods to extract year, month, and day attributes from date time objects, enabling powerful feature engineering for finance and algorithmic trading with Python.
Learn pandas visualizations for finance, including line plots and histograms of stock data (open, high, low, close, volume), and integrate matplotlib for multiple plots in time series visuals.
Learn to visualize time series data with pandas by parsing dates, indexing by date, and plotting financial series. Use matplotlib locators and formatters to tailor x-axis ticks.
Explore advanced time series visualization with pandas and matplotlib by configuring major and minor locators and formatters, customizing tick labels, rotation, and alignment for clear monthly and yearly views.
Compute rolling statistics in pandas with a moving window to reveal rolling means and volatility in finance data, using seven- and fourteen-day windows, Bollinger Bands, and QuantConnect.
Learn to manipulate pandas data with time shifting and row-based calculations, including forward and backward shifts, diffs, percent changes, and cumulative sums/products for financial data.
Master programmatic data sources for finance with pandas data reader and yfinance, exploring FRED macro data and Yahoo Finance stocks for backtesting with QuantConnect Lean.
Explore free online financial data sources, including Yahoo Finance and Google Finance, plus regulatory feeds from SEC, FINRA, and FRED. Learn to use screeners and moving averages.
Explore pandas-based finance analytics with SPY data from 2000–2021, covering loading data, inspecting head and dtypes, plotting adjusted close with 200-day rolling, volume histograms, and yearly maxima.
Explore pandas-based finance data workflows: fetch spy data, plot adjusted close and volume, compute 200-day moving averages, and analyze peak-to-recovery and percent-change dynamics.
Explore fundamental financial concepts with Python, including return and risk measures, fair value, efficient market hypothesis, and portfolio optimization with Markowitz, CAPM beta and alpha.
Assess whether the efficient market hypothesis holds, discuss random walk behavior, and consider how algorithmic trading can beat market returns amid imperfect efficiency.
Explore how to normalize returns with percent gains and mean daily percent return to fairly compare investments across different prices, time periods, and return distributions.
Analyze how to measure portfolio risk using daily percent returns, variance, and standard deviation, compare volatility across time periods, and introduce the Sharpe ratio.
Explore the Sharpe ratio, combining mean daily returns and the standard deviation of returns with a risk-free rate (often zero), and convert to yearly with sqrt(252) for fair comparisons.
Compute daily returns for Apple and Microsoft from adjusted close prices, drop the first NaN, calculate and annualize the Sharpe ratio to compare their performance.
Explore the theory and intuition behind the Sortino ratio, showing how it uses downside-only volatility with a zero threshold, unlike the Sharpe ratio that penalizes all volatility.
Implement the Sortino ratio in Python using downside risk and a zero threshold on daily returns from Apple and Microsoft, then compare with the Sharpe ratio and annualize.
Explore the probabilistic Sharpe ratio and how skew and courtesies shape return distributions, laying the groundwork for later Python calculations in Quant Connect.
Develop the probabilistic Sharpe ratio in Python by computing the daily Sharpe ratio, incorporating skew and fisher kurtosis, using psi pi to compute the cdf, and annualizing the result.
Explore modern portfolio theory by building a four-stock portfolio, compare equal-weight and weighted allocations, and use Monte Carlo analysis to map the efficient frontier and the Sharpe ratio.
Implement an equally weighted portfolio in python, compute daily and cumulative returns, and use dot products to measure portfolio gains with retail stocks, and compare to single-stock strategies.
Understand the theory and intuition of log returns and why they are popular in quantitative finance, and how logarithmic rules simplify cumulative and compound returns.
Apply a Python Monte Carlo simulation to generate random portfolio weights that sum to one, compute log returns and annualized volatility, and optimize the Sharpe ratio.
Learn to use SciPy minimize to optimize portfolio weights by minimizing negative Sharpe ratio, with bounds and a sum-to-one constraint, comparing results to Monte Carlo searches.
Implement the efficient frontier in Python using a Monte Carlo approach to optimize portfolios for a range of expected returns by minimizing volatility.
Explore the capital asset pricing model, its beta and alpha concepts, and how market returns, risk-free rate, and regression define relationships between assets and the market.
Explore CAPM with Python by analyzing long-term data, compute cumulative and percent returns, and visualize market relationships with scatter plots to assess beta and alpha against the S&P 500 benchmark.
Compute beta and alpha from capm using Python by performing linear regression on daily returns against the S&P 500, and examine Apple, Amazon, GE, VIX, and leveraged ETFs.
Explore a bank stock capstone: analyze five years of data, compute returns and Sharpe ratios, plot volumes and moving averages, and experiment with Bollinger Bands.
Explore the capstone part one returns analysis, covering date extraction, multi-stock line plots of adjusted close, daily percent changes, cumulative returns for a $10,000 starting stake, and annualized Sharpe ratios.
Plot daily and total dollar volume across banks to compare trading activity and identify the peak day for JPMorgan around March 19, 2021.
Calculate the Bank of America adjusted close and its six-day and twenty-day moving averages, then construct Bollinger Bands to visualize price volatility.
Explore algorithmic trading basics on the QuantConnect lean engine, using Python tools and financial theory to build and test strategies with buying and selling rules, shorting, leverage, and hands-on exercises.
Explore algorithmic trading basics with Quant Connect and the lean engine, build portfolio-level buying and selling rules, learn market orders, and introduce shorting and leverage for simple equity strategies.
Compare past data and unknown future in algorithmic trading, test strategies with backtesting on historical data, and prepare for live deployment with robust, rules-based buy, sell, or hold decisions.
Explore the QuantConnect platform tour to learn writing, backtesting, and live trading with the lean engine, plus pricing, data sets, and projects.
Learn how buying stock represents ownership, how market capitalization is calculated, and how bid-ask spreads, order books, and liquidity shape stock pricing and trading behavior.
Learn how common and preferred stock differ in voting and dividends, and how issuances, buybacks, splits, and reverse splits affect ownership and dilution, with adjusted closing prices.
Master the initialize method in a QuantConnect algorithm by setting start and end dates, starting cash, and equities like AAPL with daily resolution.
Master the on data method in QuantConnect to trigger trades based on portfolio status and set holdings for securities such as Apple during backtests.
Explore backtesting core concepts by evaluating a historical trading algorithm against benchmarks like the S&P 500 or Nasdaq 100, and interpret metrics such as probabilistic Sharpe ratio and drawdown.
Backtest buying and holding multiple securities on Quant Connect, with a 50/50 Apple and Microsoft split, orders, and rolling statistics. Download results to compare performance.
Learn how to liquidate a position by selling securities at a target price in QuantConnect, exploring hard-coded vs dynamic targets, trailing stop loss, and the mechanics of exiting holdings.
Explore time-based exits in QuantConnect: liquidate after a holding period or price target by tracking invested time and using time differences.
Learn to exit positions by a profit threshold or loss limit using the portfolio's unrealized profit percent, with practical examples of 100% profit and 50% loss.
Shift from portfolio-level trades to targeted buys or sells with order system, mastering market, limit, stop limit, and market on open/close orders while navigating the order book and bid-ask spread.
Learn how market orders execute at the current price through the order book. Understand how large orders incur higher costs and how to update or cancel orders and timeout settings.
Learn how limit orders reduce risk from volatility and low liquidity by setting a maximum buy price and minimum sell price in QuantConnect, where orders may not be filled immediately.
Explore stop market orders on QuantConnect to trigger a market order when a stop price is reached, contrasting with limit orders, and learn through Boeing backtesting how volatility affects fills.
Understand stop limit orders that trigger a limit price rather than a market order to manage execution during volatile prices in QuantConnect.
Learn how to use market on open and market on close orders in QuantConnect, including execution at open or close and submitting at least two minutes before the close.
learn to fetch live price and available shares, compute cash on hand, and execute market orders in a quantconnect algorithm, with profit-driven sell logic and on order events.
Learn how the QuantConnect order ticket system manages orders, updates, and events. Explore on order event listening, order status checks, and updating fields like limit price to control trades.
Interact with and update order tickets by setting a 50% stop-loss market order on Citigroup in 2007. Learn raw data normalization and end-of-day price logging for future updates.
Implement end-of-day updates to a QuantConnect order ticket, flag a five percent open-to-close drop, and raise the stop loss from 50% to 75% using the first-day close.
Schedule and run custom methods in a QuantConnect algorithm using date rules and time rules to implement conditional purchasing and monthly dollar cost averaging.
Test conditional purchasing by comparing real estate ETFs on daily gains, switching 100 percent holdings when one outperforms the other by more than two percent, using QuantConnect backtests.
explore how leverage uses borrowed capital to amplify returns by buying more shares, while understanding risks like margin calls and forced liquidation if minimum capital isn't met.
Explore how to set leverage and brokerage models in QuantConnect, compare cash vs margin accounts, and model reality factors like fees and slippage for algorithmic trading.
Learn the theory of shorting by borrowing shares via a broker, paying a borrowing fee, selling high, and buying back low, with margin calls and the risk of unlimited losses.
Learn how to implement physical shorting in QuantConnect by borrowing shares, entering a short position, and using liquidation to buy back, with margin call risks.
Explore margin calls in QuantConnect: monitor margin remaining, trigger on margin call and warning events, and model pattern day trading and extreme leverage in backtests.
Learn to conduct research and plotting to design trading algorithms and visualize backtest results with Quant Connect charting. Use notebooks for universe selection and charting to screen securities.
Discover QuantConnect charting for backtest visualization by creating and plotting on chart objects. Learn to plot spy opening prices at daily resolution and compare default charts with new chart objects.
Create a new chart object, add a line series, and attach it to the backtest results; plot daily open prices on the custom chart and explore other plot types.
Explore candlestick plots by setting the series type to candle to visualize the open, high, low, close, and volume from trade bars, with daily or minutely resolutions and color conventions.
Learn to combine plots in QuantConnect by using the index argument to place multiple series on the same chart or on separate charts, including line and scatter plots.
Modify plot properties in Quant Connect by adjusting the label name, color, and scatter symbols through the series definition, while recognizing its focus on backtesting rather than full visualization.
Explore QuantBook and research notebooks to access historical pricing, fundamental data, and technical indicators for researching strategies in a notebook environment, without event-driven backtesting.
Explore research notebooks with QuantBook to access securities historical data, add equities, fetch daily history, and visualize open, high, low, close, and volume in Python.
Explore fundamental data in QuantConnect research notebooks, retrieving Morningstar fundamentals via the data library with security keys, using get fundamental to fetch metrics, and resampling to daily or quarterly resolutions.
Explore technical indicators in QuantConnect research notebooks, learn to call indicators as classes, plot bollinger bands, and understand symbol requirements and documentation navigation.
Explore universe selection in QuantConnect: filter thousands of stocks with coarse and fine filters, using price and liquidity first, then technical or fundamental indicators to build the universe.
Create a coarse universe filter for Quant Connect that uses the sorted function and list comprehension to pick the top three most expensive stocks from 8000 equities at daily resolution.
Simulate universe selection using the on securities changed method to liquidate removed securities and buy added ones, based on the top 10 most expensive stocks, with event-driven updates.
Explore universe selection by adding fine filters after course filters, filtering by price, volume, and fundamental or technical data while considering memory and performance in QuantConnect.
Welcome to the ultimate online course to go from zero to hero in Python for Finance, including Algorithmic Trading with LEAN Engine!
This course will guide you through everything you need to know to use Python for Finance and conducting Algorithmic Trading on the QuantConnect platform with the powerful LEAN engine!
This course is specifically design to connect core financial concepts to clear Python code. You will learn about in-demand real world skills that are highly sought after in the fintech ecosystem.
We'll cover the following topics used by financial professionals:
Python Crash Course Fundamentals
NumPy for High Speed Numerical Processing
Pandas for Efficient Data Analysis
Matplotlib for Data Visualization
Stock Returns Analysis
Cumulative Daily Returns
Volatility and Securities Risk
EWMA (Exponentially Weighted Moving Average)
Sharpe Ratio
Portfolio Allocation Optimization
Efficient Frontier and Markowitz Optimization
Types of Funds
Order Books
Short Selling
Capital Asset Pricing Model
Stock Splits and Dividends
Efficient Market Hypothesis
Algorithmic Trading with QuantConnect
Futures Trading
Options Trading
and much more!
Why choose this specific course to learn Python, Finance, and Algorithmic Trading?
This course starts by teaching you some of the most important and popular libraries in Python for Data Analysis and Visualization, includign NumPy, Pandas, and Matplotlib.
Each lecture includes a high quality HD video with clear instructions and relevant theory slides as well as a full Jupyter Notebook with explanatory code and text.
This course has complete coverage allowing you to actually implement your ideas as algorithms, other courses online never actually show you how to trade with your new knowledge!
Powerful online community with our QA Forums with thousands of students and dedicated Teaching Assistants, as well as student interaction on our Discord Server.
All of this comes with a 30-day money back guarantee, so you can try out the course absolutely risk free!