metadata
title: Asset Class Comparison
emoji: π₯
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.44.1
python_version: '3.12'
app_file: app.py
pinned: false
license: mit
short_description: An asset class comparator for my personal usecase
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Asset Class Performance Comparison
This Streamlit app allows you to compare the performance of different asset classes over time, including stocks, bonds, gold, and fixed deposits.
Features
- Compare multiple asset classes simultaneously
- Choose between USD and SGD currencies
- Customize investment parameters (initial amount, time period)
- View performance graphs and annualized returns
- Support for major indices and individual stocks
How to Use
- Select your preferred currency (USD or SGD)
- Enter your initial investment amount
- Choose the time period for comparison
- Select the assets you want to compare
- View the performance graph and returns
Assets Available
- Fixed Deposit
- Gold
- SGS Bonds
- US Treasury Bonds
- Major Indices (NASDAQ, S&P 500, Dow Jones)
- Individual Stocks (Microsoft, Google, Nvidia, Apple, etc.)
Technical Details
The app uses:
- Streamlit for the web interface
- yfinance for market data
- Plotly for interactive graphs
- Pandas for data manipulation
Hosting
This app is hosted on Hugging Face Spaces. You can access it at [link to be added after deployment].
Local Development
To run locally:
- Clone this repository
- Install dependencies:
pip install -r requirements.txt
- Run the app:
streamlit run app.py
Project Structure
asset-class-comparison/
βββ app.py # Main Streamlit application
βββ requirements.txt # Python dependencies
βββ README.md # This file
βββ utils/ # Utility functions
βββ yfinance_utils.py # yfinance data fetching utilities
βββ currency_utils.py # Currency conversion utilities
βββ fd_utils.py # Fixed deposit calculation utilities
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.