Online Course
Python for Finance

Blend investment analysis skills with Python programming: Master financial analysis using Python

4.8

862 reviews on
9,121 students already enrolled
  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Skill level:

Basic

Duration:

6 hours
  • Lessons (4 hours)
  • Practice exams (1.5 hours)

CPE credits:

7.5
CPE stands for Continuing Professional Education and represents the mandatory credits a wide range of professionals must earn to maintain their licenses and stay current with regulations and best practices. One CPE credit typically equals 50 minutes of learning. For more details, visit NASBA's official website: www.nasbaregistry.org

Accredited

certificate

What you learn

  • Obtain the efficient frontier in Python to visualize optimal portfolios.
  • Calculate and compare rates of return and associated risk of securities.
  • Measure portfolio risk and identify idiosyncratic and market risk types.
  • Apply Markowitz optimization to construct optimal investment portfolios.
  • Leverage CAPM and Monte Carlo simulations to estimate return and risk.

Topics & tools

PythonData AnalysisFinancial AnalysisProgrammingInvestment AnalysisMontecarlo SimulationData PreprocessingRegression AnalysisMultivariate RegressionData VisualizationTheoryFinance SkillsIndustry Specialization

Your instructor

Course OVERVIEW

Description

CPE Credits: 7.5 Field of Study: Information Technology
Delivery Method: QAS Self Study
Python for Finance is the crossing point where programming in Python blends with financial theory. Together, they give you the know-how to apply that theory into practice and real-life scenarios. In a world where individuals and companies are aiming to become more and more autonomous, your ability to combine programming skills with financial data will allow you to create independent analyses. And that competency will give you an edge over your competitors or in your personal investments. To prepare you for these multi-faceted challenges, this course provides the relevant topics in financial theory and their hands-on application in Python.

Prerequisites

  • Python (version 3.8 or later), pandas library, and a code editor or IDE (e.g., Jupyter Notebook, Spyder, or VS Code)
  • Basic familiarity with Python programming is required.
  • Familiarity with NumPy is helpful but not mandatory.

Curriculum

65 lessons 27 exercises 4 exams
  • 1. Useful Tools
    42 min
    In this course, we assume that you have already gone through our Introduction to Python course. However, you can add more layers to what you have learnt there. In this section, we will add more Python programming skills to your arsenal, explaining OOP, importing modules, in particular - the pandas-datareader module, as it allows us to download financial data and more.
    42 min
    In this course, we assume that you have already gone through our Introduction to Python course. However, you can add more layers to what you have learnt there. In this section, we will add more Python programming skills to your arsenal, explaining OOP, importing modules, in particular - the pandas-datareader module, as it allows us to download financial data and more.
    Course Introduction Free
    Must-Have Packages for Finance and Data Science Free
    Exercise Free
    Working with Arrays Free
    Generating Random Numbers Free
    Important Note on Using Online Financial Data Sources Free
    Using Financial Data in Python Free
    Importing and Organizing Data in Python - Part I Free
    Importing and Organizing Data in Python - Part II Free
    Importing and Organizing Data in Python - Part III Free
    Changing the Index of Your Time-Series Data Free
    Restarting the Jupyter Kernel Free
  • 2. Calculating and Comparing Rates of Return in Python
    46 min
    As an investor, you would like to be able to compare the performance of the stocks in your portfolio. One of the most important measures that will allow you to do that is the rate of return of the stock. This section will explain the relevant theory in detail and will provide you with the tools to do that yourself using Python.
    46 min
    As an investor, you would like to be able to compare the performance of the stocks in your portfolio. One of the most important measures that will allow you to do that is the rate of return of the stock. This section will explain the relevant theory in detail and will provide you with the tools to do that yourself using Python.
    Considering Both Risk and Return Free
    Exercise Free
    What Are We Going to See Next Free
    Calculating a Security's Rate of Return Free
    Exercise Free
    Calculating a Security's Rate of Return in Python - Simple Returns - Part I Free
    Calculating a Security's Rate of Return in Python - Simple Returns - Part II Free
    Calculating a Security's Rate of Return in Python - Logarithmic Returns Free
    What Is a Portfolio of Securities and How to Calculate Its Rate of Return Free
    Exercise Free
    Using 'Loc' and 'Iloc' - Notes Free
    Calculating the Rate of Return of a Portfolio of Securities Free
    Popular Stock Indices Free
    Exercise Free
    Calculating the Rate of Return of Indices Free
  • 3. Meаsuring Investment Risk
    41 min
    Achieving a high rate of return of your stocks doesn’t come at no cost. Every investment is associated with a certain level of risk, and an investor must be well aware of it before putting their money in a certain basket. This section will teach you how to understand and measure such risk using Python.
    41 min
    Achieving a high rate of return of your stocks doesn’t come at no cost. Every investment is associated with a certain level of risk, and an investor must be well aware of it before putting their money in a certain basket. This section will teach you how to understand and measure such risk using Python.
    How Do We Measure a Security's Risk
    Exercise
    Calculating a Security's Risk in Python
    The Benefits of Portfolio Diversification
    Exercise
    Calculating the Covariance Between Securities
    Exercise
    Measuring the Correlation between Stocks
    Exercise
    Calculating Covariance and Correlation
    Considering the Risk of Multiple Securities in a Portfolio
    Calculating Portfolio Risk
    Understanding Systematic vs. Idiosyncratic Risk
    Exercise
    Calculating Diversifiable and Non-diversifiable Risk of a Portfolio
    Practice exam
  • 4. Using Regressions for Financial Analysis
    22 min
    Understanding rates of return and risk is not all there is about finance. Working with regression analysis is a must, and you will see that Python only helps you to be quicker and more precise when doing such estimations.
    22 min
    Understanding rates of return and risk is not all there is about finance. Working with regression analysis is a must, and you will see that Python only helps you to be quicker and more precise when doing such estimations.
    The Fundamentals of Simple Regression Analysis
    Exercise
    Running a Regression in Python
    Are All Regressions Created Equal? Learning How to Distinguish Good Regressions
    Exercise
    Computing Alpha, Beta, and R Squared in Python
  • 5. Markowitz Portfolio Optimization
    20 min
    One of the main pillars of modern finance is the Markowitz Portfolio Theory. It relates to building a portfolio optimization model, which is quite a complex task mathematically. However, you can see once more how Python can make such a challenge manageable, so long as we stick to theory and are careful at each step while coding.
    20 min
    One of the main pillars of modern finance is the Markowitz Portfolio Theory. It relates to building a portfolio optimization model, which is quite a complex task mathematically. However, you can see once more how Python can make such a challenge manageable, so long as we stick to theory and are careful at each step while coding.
    Markowitz Portfolio Theory - One of the main Pillars of Modern Finance
    Exercise
    Obtaining the Efficient Frontier in Python - Part I
    Obtaining the Efficient Frontier in Python - Part II
    Obtaining the Efficient Frontier in Python - Part III
  • 6. The Capital Asset Pricing Model
    26 min
    As good or bad your portfolio may be, it is not self-sufficient. It is always part of a bigger picture – the market. That’s why you’d always want to compare the performance of your portfolio to the market. The Capital Asset Pricing Model (CAPM), the Beta of a stock, the Sharpe ratio and other measures will come in handy… and will be applied to real data with Python!
    26 min
    As good or bad your portfolio may be, it is not self-sufficient. It is always part of a bigger picture – the market. That’s why you’d always want to compare the performance of your portfolio to the market. The Capital Asset Pricing Model (CAPM), the Beta of a stock, the Sharpe ratio and other measures will come in handy… and will be applied to real data with Python!
    The Intuition behind the Capital Asset Pricing Model (CAPM)
    Exercise
    Understanding and Calculating a Security's Beta
    Exercise
    Calculating the Beta of a Stock
    The CAPM Formula
    Exercise
    Calculating the Expected Return of a Stock (CAPM)
    Introducing the Sharpe Ratio and the Way It Can Be Applied in Practice
    Exercise
    Obtaining the Sharpe Ratio in Python
    Measuring Alpha and Verifying How Good (or Bad) a Portfolio Manager Is Doing
    Practice exam
    Exercise
  • 7. Multivariate Regression Analysis
    12 min
    While in Section 4 we deal with simple regression analysis, here we will take this technique to the next level. As you can guess, multivariate regression analysis is more advanced, but is also more interesting, as it allows you to deal with more complex financial problems.
    12 min
    While in Section 4 we deal with simple regression analysis, here we will take this technique to the next level. As you can guess, multivariate regression analysis is more advanced, but is also more interesting, as it allows you to deal with more complex financial problems.
    Multivariate Regression Analysis - a Valuable Tool for Finance Practitioners
    Exercise
    Running a Multivariate Regression in Python
  • 8. Monte Carlo Simulations as a Decision-Making Tool
    60 min
    You can’t consider yourself a full-fledged investor if you don’t know how to use Monte Carlo Simulations. All tools you’ve learnt so far in the course will be essential to your ability to embrace the advantages of this technique for visualizing the potential outcomes of financial operations and improving your estimation of the risk associated with them.
    60 min
    You can’t consider yourself a full-fledged investor if you don’t know how to use Monte Carlo Simulations. All tools you’ve learnt so far in the course will be essential to your ability to embrace the advantages of this technique for visualizing the potential outcomes of financial operations and improving your estimation of the risk associated with them.
    The Essence of Monte Carlo Simulations
    Exercise
    What is a Normal Distribution? - Note
    Monte Carlo Applied in a Corporate Finance Context
    Exercise
    Monte Carlo: Predicting Gross Profit - Part I
    Monte Carlo: Predicting Gross Profit - Part II
    Forecasting Stock Prices with a Monte Carlo Simulation
    Exercise
    Another Way to Calculate Simple and Log Returns - Note
    Monte Carlo: Forecasting Stock Prices - Part I
    Monte Carlo: Forecasting Stock Prices - Part II
    Monte Carlo: Forecasting Stock Prices - Part III
    An Introduction to Derivative Contracts
    Exercise
    The Black-Scholes Formula for Option Pricing
    Monte Carlo: Black-Scholes-Merton
    Exercise
    Monte Carlo: Euler Discretization - Part I
    Monte Carlo: Euler Discretization - Part II
    Practice exam
  • 9. Course exam
    80 min
    80 min
    Course exam

Free lessons

Course Introduction

1.1 Course Introduction

4 min

Must-Have Packages for Finance and Data Science

1.2 Must-Have Packages for Finance and Data Science

5 min

Working with Arrays

1.3 Working with Arrays

6 min

Generating Random Numbers

1.4 Generating Random Numbers

3 min

Important Note on Using Online Financial Data Sources

1.5 Important Note on Using Online Financial Data Sources

1 min

Using Financial Data in Python

1.6 Using Financial Data in Python

3 min

Start for free

96%

of our students recommend

365 Data Science.

9 in 10

people walk away career-ready

with practical data and AI skills.

$29,000

average salary increase

after moving to an AI and data science career

ACCREDITED certificates

Craft a resume and LinkedIn profile you’re proud of—featuring certificates recognized by leading global institutions.

Earn CPE-accredited credentials that showcase your dedication, growth, and essential skills—the qualities employers value most.

  • Institute of Analytics
  • The Association of Data Scientists
  • E-Learning Quality Network
  • European Agency for Higher Education and Accreditation
  • Global Association of Online Trainers and Examiners

Certificates are included with the Self-study learning plan.

A LinkedIn profile mockup on a mobile screen showing Parker Maxwell, a Certified Data Analyst, with credentials from 365 Data Science listed under Licenses & Certification. A 365 Data Science Certificate of Achievement awarded to Parker Maxwell for completing the Data Analyst career track, featuring accreditation badges and a gold “Verified Certificate” seal.

How it WORKS

  • Lessons
  • Exercises
  • Projects
  • Practice exams
  • AI mock interviews

Lessons

Learn through short, simple lessons—no prior experience in AI or data science needed.

Try for free

Exercises

Reinforce your learning with mini recaps, hands-on coding, flashcards, fill-in-the-blank activities, and other engaging exercises.

Try for free

Projects

Tackle real-world AI and data science projects—just like those faced by industry professionals every day.

Try for free

Practice exams

Track your progress and solidify your knowledge with regular practice exams.

Try for free

AI mock interviews

Prep for interviews with real-world tasks, popular questions, and real-time feedback.

Try for free

Student REVIEWS

A collage of student testimonials from 365 Data Science learners, featuring profile photos, names, job titles, and quotes or video play icons, showcasing diverse backgrounds and successful career transitions into AI and data science roles.