provide technical analysis of financial markets
Project description
Technical Analysis Project
A Python-based project for performing technical analysis on financial data. This project includes various indicators and strategies, along with backtesting capabilities.
Features
- Volume-Price Divergence Signal
- Bollinger Bands, ATR, Stochastic Oscillator
- Fibonacci Retracement Levels
- Sharpe Ratio Calculation
- Portfolio Performance Visualization with Plotly
Installation
-
Clone the repository:
git clone https://github.com/charleschou99/TechnicalAnalysis.git cd TechnicalAnalysis
-
Install the required packages:
pip install -r requirements.txt
Usage
1. Backtest a Trading Strategy
Run the backtest_volume_signal.py script to backtest the volume-price divergence strategy on a stock (e.g., AMD):
python backtest_volume_signal.py
Example Output:
Final Portfolio Value: $12,345.67
Total Profit: $2,345.67
Return: 23.46%
Sharpe Ratio: 1.45
2. Customize Backtest Parameters
You can modify the ticker, time range, and initial capital in backtest_strategy:
backtest_strategy(ticker="AMD", start_date="2022-11-01", end_date="2023-11-01", initial_capital=10000)
3. Visualize Portfolio Performance
After running the backtest, a Plotly graph will appear, showing:
- Portfolio Value over time
- Cash Balance
- Stock Holdings Value
Project Structure
├── dataGetter # Data retrieval from Yahoo Finance (v0)
├── signal # Signal generation scripts
├── backtest # Backtest and example script
├── tests # Example script for base functions
├── requirements.txt # Python package dependencies
├── README.md # Project documentation
Dependencies
Install all dependencies with:
pip install -r requirements.txt
License
This project is licensed under the MIT License.
Feel free to contribute, report issues, or suggest improvements!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file charles_chou_technicalanalysis-0.1.0.tar.gz.
File metadata
- Download URL: charles_chou_technicalanalysis-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.9 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d250e8155a4ea0dff309081bcc9bdc5fb41ddf0021bb3d86e1b5a8a8eb5db67a
|
|
| MD5 |
9e9145e21650d66ae55437c95e52177f
|
|
| BLAKE2b-256 |
ff0caacf1ccfb06fc967bdbdbbda620e62ef94cf6c26144dc840652e94bc14df
|
File details
Details for the file charles_chou_technicalanalysis-0.1.0-py3-none-any.whl.
File metadata
- Download URL: charles_chou_technicalanalysis-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.9 Darwin/24.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
431fd983b406cd790fcabfc391038538163c19274235d57e44ccf54f5d123066
|
|
| MD5 |
b76e8e43d89e79a1827522d6d9e306e5
|
|
| BLAKE2b-256 |
51212373236ce4f46f15dd2e684fd7105d386415c6e7adc69c08b22c96651b17
|