pyguides

Tutorial series

Python for Finance

5 tutorials — follow in order for the best learning path.

  1. Python for Finance: Getting Started

    Learn the fundamentals of financial analysis with Python — setting up your environment, working with data, and performing your first stock analysis

  2. Fetching Stock Data with yfinance

    Learn how to download and analyze stock market data using Python's yfinance library.

  3. Calculating Returns and Volatility

    Learn how to calculate simple and log returns, annualized returns, and volatility measures for stock data analysis using Python

  4. Portfolio Analysis in Python

    Learn how to analyze investment portfolios using Python — calculate returns, volatility, Sharpe ratio, and visualize performance

  5. Backtesting a Simple Strategy

    Learn how to backtest trading strategies in Python — build a moving average crossover strategy and analyze key performance metrics