We're using cookies, but you can turn them off in your browser settings. Otherwise, you are agreeing to our use of cookies. Learn more in our Privacy Policy

Python Programming Fundamentals

Develop fluency in writing Python code for finance-based data science projects using Jupyter Notebooks.
a programmer sitting in front of screens full of computer code

Structure & duration

10–20 hours to complete

Online self-paced

Practical Skills Modules can be completed online at your own pace.

Prerequisites

We recommend candidates have familiarity with the principles behind Equity Investments and Financial Statement Analysis content from the Level II CFA curriculum.

Available for Level I, Level II, and Level III.

Overview of Python Programming Fundamentals

Python is the most popular language for machine learning, artificial intelligence, and big data projects for data science professionals due to its efficiency, versatility, and scalability. Python’s library ecosystem and clear syntax make it both easy to learn and easy to deploy. Overwhelmingly, an increasing number of employers expect their staff to have Python knowledge.

In Python Programming Fundamentals, you will explore the basics of Python and how to use Jupyter Notebooks in order to develop, present, and share data science projects-related to finance. Over the course of this module, you will be guided through a series of videos, knowledge check questions, and projects to quickly build up your coding skills while applying them to dozens of industry-specific examples. After completing this module, you will have the tools to apply what you’ve learned immediately.

Key learning objectives for Python Programming Fundamentals

  • Master Python programming fundamentals such as variables, datatypes, loops, functions, and conditional statements. 
  • Discover how to use Jupyter Notebooks for developing, presenting, and sharing data science projects. 
  • Leverage key Python libraries such as Pandas for data wrangling and analysis, Matplotlib and Seaborn for data visualization, and Plotly Express for interactive data visualization in a financial context. 
  • Perform portfolio optimization, run Monte Carlo simulations, and calculate portfolio returns, risks, and Sharpe ratios in Python. 
  • Obtain real-world financial data using Pandas Data Reader and Yahoo Finance API in Python. 

Key learning objectives by unit

    • Define Python variables, assign values to them, and perform math operations.
    • Discern the differences among various data types in Python, such as integers, floating points, and Booleans.
    • Leverage the Python print() function to display a message to the screen.
    • Handle complex string formatting using Python’s string format() method.
    • Use the Python built-in input() function to get data from the user via the keyboard.
    • Develop a Python application that can take data from the user, analyze it, and display a message to the screen.
    • Define Python lists, understand their use cases, and use indexing and slicing to access one or more elements within the list.
    • Define Python dictionaries and learn how to access specific elements using their keys.
    • Apply comparison operators in Python to compare two operands with each other.
    • Understand conditional statements or if-else conditions in Python.
    • Develop a simple password authentication application in Python.
    • Develop a Python application that can evaluate stocks and indicate whether they are overvalued, fairly valued, or undervalued.
    • Describe the syntax and use cases of for and while loops in Python.
    • Describe the use case of the range() function and how it could be used with for loops.
    • Describe the syntax and use cases of functions in Python.
    • Learn how to call Python functions, send them arguments, and receive data from them.
    • Develop a function that calculates the future value of money given the present value, annual interest rate, number of years, and number of compounding periods.
    • Leverage pre-defined Python built-in functions.
    • Define two-dimensional Pandas DataFrames and obtain their statistical summary. 
    • Handle missing data in Pandas DataFrames and filter them out based on a specific condition. 
    • Define Python functions and apply them along an axis in a Pandas DataFrame. 
    • Perform DataFrame concatenation and merging. 
    • Use the yfinance library to obtain financial market data, such as stock prices, beta, earnings per share (EPS), balance sheets, and income statements. 
    • Leverage available methods to display stocks’ paid dividends, stock splits, and analysts’ ratings and recommendations. 
    • Master Python programming fundamentals through a practical real-world project.    
    • Obtain real-world financial data using Pandas DataReader; data is obtained from many sources such as Yahoo Finance, NASDAQ, and many more.  
    • Leverage key Python libraries such as Pandas for Data Analysis, Matplotlib for data plotting/visualization, and Seaborn for statistical plots in a financial context.  
    • Use the Plotly Express Library to perform interactive financial data visualization.  
    • Calculate portfolio key statistical metrics such as returns, risk, and Sharpe ratio in Python.   
    • Perform portfolio analysis and visualization using real-world datasets.  
    • Run Monte Carlo simulations and perform portfolio optimization.  

    Explore the CFA® Program

    Whether you’re considering the CFA Program or already registered as a candidate, we have information and resources to help you navigate the next step.

    Already a candidate?  Access candidate resources

    Man in suit crossing traffic