A web-based financial charting tool that displays candlestick charts, technical indicators, and a unique Highlight Chart mode for visualizing price ranges.
# Install dependencies
pip install -r requirements.txtNote: Ensure all dependencies are installed to run local_test.py and the data-fetching scripts.
python local_test.pyThen open url in your browser.
Only when changing dev/ticker-source.js, regenerate public/static/list.js with Node.js:
npm run build-tickersGitHub Pages + AWS Lambda (Function URL) (Serverless)
https://berochlu.github.io/market-chart/
(Requires a custom Lambda Layer foryfinance& dependencies. See instructions below.)
This repository includes a workflow for GitHub Pages deployment:
- GitHub Pages (
deploy-pages.yml): Automatically deployed on push tomaster.
- Candlestick Chart (OHLC bars)
- Highlight Chart (gradient-filled high/low range)
- Ichimoku Cloud (Tenkan, Kijun, Span A/B, Chikou)
- 25-day Moving Average
- Timeframes:
6mo/1y/2y/5y/10y/max - Intervals:
1d/1wk/1mo - Invert Mode (🔃): Flip prices to provide another view
- Highlight Mode (🌡): Switch to gradient-based high/low visualization
- Future Cloud Mode (☁️): Project Ichimoku Cloud 26 days ahead into the future
- Enter a Ticker Symbol
- Type in the input box (e.g.,
MSFT,AAPL) or select from the dropdown.
- Adjust Settings
- Choose a timeframe and interval.
- View Charts
- Click "📈" to render.
- Reset
- Click the "✕" button inside the input box to clear.
Preloaded symbols include:
ARKK, BTC-USD, ETH-USD, SPY, QQQ, TLT, VXX
- Data Source: yfinance
- Libraries: Apache ECharts, Lodash, Moment.js
- Mobile-Friendly: Responsive design for all devices
To run aws-lambda.py on AWS Lambda, you need to create a custom Lambda Layer containing yfinance and its dependencies (compiled for Linux environment).
This project's Layer was built using WSL2 Ubuntu 22.04. Ensure that the Python version in WSL2 (for example, Python 3.13) matches the Python runtime configured for the Lambda function.
Run the following commands in WSL2. Replace python3.13 with the Python version configured for the Lambda function.
# Create directory structure
mkdir -p lambda_layer/python
cd lambda_layer
# Install the pinned yfinance version and its dependencies
python3.13 -m pip install --target=./python "yfinance==1.5.2"
# Package into ZIP
zip -r yfinance_layer.zip python
# Copy to Windows Desktop
cp yfinance_layer.zip /mnt/c/Users/username/Desktop/- Upload
yfinance_layer.zipas a new Lambda Layer on AWS Console. - Select the same Python runtime used to build the layer as the compatible runtime.
- Attach the layer to your Lambda function.