The Capital Asset Pricing Model (CAPM): Financial Analysis In Python

In this article, I explain how to perform basic financial analysis for stock time series. The CAPM model is also explained and used to estimate asset expected return based on historical data.

Serafeim Loukas, PhD
Towards AI
Published in
10 min readFeb 9, 2023

--

Figure produced by the author in Python.

1. Introduction

--

--

Data Scientist @ Natural Cycles (Switzerland). PhD, MSc, M.Eng. Bespoke services on demand