Finance Train LogoFinance Train
LibraryBlogMembership
Finance TrainFinance Train
Home
Learn
Getting StartedGetting StartedPythonPythonR ProgrammingR ProgrammingQuantitative FoundationsQuantitative FoundationsData AnalysisData AnalysisMachine LearningMachine LearningAIAIFinance AppsFinance Apps
BlogToolsMembership
CoursesInvestment Risk and Return Analysis In Python
Premium

Investment Risk and Return Analysis In Python

Learn how to evaluate investment risks and returns using Python. Covers financial risk fundamentals, return calculations, statistical measures (mean, variance, skewness, kurtosis), and practical analysis techniques for real-world investment data.

This course is designed for finance students and investment professionals who want a practical understanding of how to evaluate investment risks and returns using Python.

Starting from the foundational concepts of risk and return, the course walks you through step-by-step calculations using real stock data. You will learn how to measure different types of returns, understand the statistical properties of return distributions, and apply formal normality tests, all using Python's scientific computing ecosystem.

What You Will Learn

By the end of this course, you will be able to:

  • Calculate simple (discrete) and logarithmic returns from stock price data
  • Visualise the distribution of returns using histograms
  • Understand and compute the four moments of a distribution: mean, variance, skewness, and kurtosis
  • Test whether financial returns follow a normal distribution using the Shapiro-Wilk test
  • Apply these techniques to real-world stock data using pandas, numpy, scipy, matplotlib, and seaborn

These skills will prepare you for more complex areas of portfolio risk management.

Prerequisites

A basic familiarity with Python and introductory statistics is helpful but not required. The course introduces every concept from first principles.

Data and Code

All code examples use a sample dataset (stock_data.csv) included with the course materials. A complete Jupyter notebook (risk-return.ipynb) is also provided for interactive exploration. Keep both files in the same folder before running any code.

Lessons

01

Investment Risk and Returns

Start
02

Discreet Vs Logarithmic Returns – Which One to Use?

Start
03

Analyzing Financial Time Series Data with Python

Start
04

Step 1: Load the Data

Start
05

Step 2: Calculate Returns

Start
06

Step 3: Visualize the Distribution of Returns

Start
07

Statistical Foundations of Return Distributions

Start
08

Moments of a Distribution

Start
09

Mean, Variance, and Normal Distribution

Start
10

Calculating the First and Second Moments (Mu and Variance) in Python

Start
11

Higher Moments of Distribution

Start
12

Calculate Skewness and Kurtosis in Python

Start
13

Conducting Normality Tests in Python: Practical Applications

Start
14

Conclusion

Start

Premium Course

Unlock all lessons and resources in Investment Risk and Return Analysis In Python.

One-time payment - access every course

What's Included

Online Lessons

Chat with Lessons

Quizzes

Course Project

Downloadable Ebook

Jupyter Notebooks

Datasets

Resources

(2)
Finance Train

Learn data science and AI skills for finance through practical courses and tutorials.

Learn

  • Learning Path
  • Blog
  • Finance Fundamentals

Resources

  • Tools
  • Tables
  • Calculators
  • Membership

Company

  • About
  • Contact
  • Privacy
  • Terms

© 2026 Finance Train. All rights reserved.