Skip to content

hangg-ca/case_study_24

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coding-project-case-study

This is a coding project case study for a portfolio construction. The code is not organized in an object-oriented way, but it is organized in a way that is easy to understand and follow. For more complex projects, I would suggest organizing the code in an object-oriented way. It will make the code more, scalable, readable and maintainable.

Code Structure

The code is structured in the following way:

--data
  |--data_handler.py
    Class DataHandler
  |--uti.py
    Host the utility functions for nearest PD matrix and risk parity construction.

Scripts:

main_chart_plotter.py: Used for running the code for word cloud chart.

main_q2.py: main code for running the code for step by step portoflio construction.

How to run the code:

Environment

The code is using common libraries such as pandas, numpy, matplotlib, and scipy. The optimizer is using cvxpy library. The environment is managed using conda. If you need to create the environment, you can use the environment.yml file to create the environment.

To create the environment, run the following command:
conda env create -f environment.yml
To activate the environment, run the following command:
conda activate case_24
Ref: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

For any questions, please feel free to contact me.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages