Skip to content
/ SCL Public

This project analyzes the Security Characteristic Line (SCL) for selected UK or US stock and its respective index, allowing users to visualize excess returns and calculate Beta and Jensen's Alpha.

License

Notifications You must be signed in to change notification settings

ejb1987/SCL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCL Analysis Project

Overview

The Security Characteristic Line (SCL) Analysis project aims to evaluate the performance of selected stocks in relation to market risk. This project leverages historical stock prices, market returns, and risk-free rates to compute expected returns, alpha, and beta, and visualizes the relationships through scatter plots and the SCL.

Table of Contents

Installation

  1. Clone the repository:
    git clone https://github.com/ejb1987/SCL.git
    cd SCL
    
  2. Install required packages: Make sure you have pip installed. Then run:
    pip install -r requirements.txt
    

Usage

Open the Jupyter Notebook:

jupyter notebook SCL.ipynb

Input your selected stock ticker (e.g., AAPL for Apple Inc.). For UK companies, use the format ticker.L (e.g., BP.L for BP).

Run the cells in the notebook to perform the CAPM analysis. You will obtain:

  1. Average annual returns and variance for the selected stock and the corresponding market index (US or UK).
  2. The computation of CAPM beta and Jensen's alpha, which quantify the sensitivity of the stock's returns to market movements and the stock's excess return, respectively.
  3. A scatter plot comparing the weekly returns of the stock and the market index, along with the Security Characteristic Line (SCL), which represents the relationship between the excess return of the stock and the excess return of the market.

image

Features

  • Average Annual Return Calculation: Computes the expected annual return for the selected stock and its corresponding market index.
  • Risk-Free Rate Adjustment: Automatically selects the appropriate market index and risk-free rate based on the stock market.
  • Beta and Alpha Calculation: Analyzes the stock's sensitivity to market movements and calculates its excess return, enabling an understanding of its risk-adjusted performance.
  • Visualizations: Displays scatter plots of weekly returns and the Security Characteristic Line (SCL), providing insights into the stock's risk-return profile.

Contributing

Contributions are welcome! Please feel free to fork the repository and submit a pull request. If you have any suggestions or find any bugs, please open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

Ehsan - [email protected]

Project Link: https://github.com/ejb1987/CAPM

About

This project analyzes the Security Characteristic Line (SCL) for selected UK or US stock and its respective index, allowing users to visualize excess returns and calculate Beta and Jensen's Alpha.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published