{"id":50957338,"url":"https://github.com/gitrasheed/var-cvar-streamlit-risk-analyzer","last_synced_at":"2026-06-18T09:02:41.739Z","repository":{"id":271795988,"uuid":"855735569","full_name":"gitRasheed/var-cvar-streamlit-risk-analyzer","owner":"gitRasheed","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-17T17:30:07.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-17T20:27:11.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://var-cvar-risk.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitRasheed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-11T11:36:06.000Z","updated_at":"2025-07-17T17:30:11.000Z","dependencies_parsed_at":"2025-01-09T23:34:19.271Z","dependency_job_id":"e3667b4e-9fba-4232-ba7b-55d2dadf0e00","html_url":"https://github.com/gitRasheed/var-cvar-streamlit-risk-analyzer","commit_stats":null,"previous_names":["gitrasheed/var-cvar-streamlit-risk-analyzer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gitRasheed/var-cvar-streamlit-risk-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitRasheed%2Fvar-cvar-streamlit-risk-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitRasheed%2Fvar-cvar-streamlit-risk-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitRasheed%2Fvar-cvar-streamlit-risk-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitRasheed%2Fvar-cvar-streamlit-risk-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitRasheed","download_url":"https://codeload.github.com/gitRasheed/var-cvar-streamlit-risk-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitRasheed%2Fvar-cvar-streamlit-risk-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34483284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-18T09:02:37.831Z","updated_at":"2026-06-18T09:02:41.733Z","avatar_url":"https://github.com/gitRasheed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 VaR and CVaR Calculator: Financial Risk Analysis Tool\n\n## Overview\n\nThis Streamlit web app calculates and visualizes Value at Risk (VaR) and Conditional Value at Risk (CVaR) for custom stock portfolios. I wanted to make this after first learning of CVaR from [this interview](https://youtu.be/pEkAICRqjvY?si=DpQ2xdIYrN4pu_tO) with Stanislav Uryasev.\n\n## Features\n\n### Portfolio Management\n\n- Custom stock portfolio creation with flexible weightings\n- Real-time market data via yfinance integration\n- Adjustable portfolio value and time horizons\n\n### Risk Calculation Methods\n\n- Historical: Based on actual past returns\n- Parametric: Normal distribution assumption\n- Monte Carlo: Return distribution simulation\n\n### Analysis Options\n\n- Adjustable confidence levels (90% - 99%)\n- Rolling window analysis for risk evolution\n- Flexible date range selection\n\n### Visualizations\n\n- Return distribution histograms with VaR/CVaR markers\n- Rolling window time series plots\n- Monte Carlo simulation distributions\n\n## Technical Stack\n\n- Streamlit: Web framework\n- Pandas \u0026 yfinance: Data handling\n- SciPy: Statistical computations\n- Plotly: Interactive visualizations\n- Pytest: Testing framework\n\n## Installation\n\n1. Clone the repository\n2. Install dependencies: `pip install -r requirements.txt`\n3. Run the app: `streamlit run streamlit_app.py`\n\n## Future Enhancements\n\n- Historical crisis scenario stress testing\n- Portfolio optimization using CVaR\n\n## Acknowledgements\n\nInspiration for this project came from Prudhvi Reddy's implementation of a similar web application. Their work provided valuable insights into the practical application of financial risk metrics in a web environment.\n\n[LinkedIn](https://www.linkedin.com/in/khoshnaw) | [GitHub](https://github.com/gitrasheed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitrasheed%2Fvar-cvar-streamlit-risk-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitrasheed%2Fvar-cvar-streamlit-risk-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitrasheed%2Fvar-cvar-streamlit-risk-analyzer/lists"}