Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
arman-bd committed Dec 8, 2024
1 parent d99c687 commit 895b7e0
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 153 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ Generated signals for AAPL using MACD Strategy
│ AAPL │ MACD Strategy │ stock │ 71 │ $2,705.18 │ 38.0% │
└─────────┴───────────────┴────────┴────────┴────────────┴──────────┘
```
» [View Event Journal](https://arman-bd.github.io/tradepruf/docs/sample_trade/backtest_btc-eth-aapl.txt)

**Analysis Dashboard**
Analysis Dashboard contains some interactive charts and tables to help you understand the performance of your portfolio. Here are some screenshots of the dashboard:

| ![Screenshot 1](docs/sample_trade/screenshot_1.png) | ![Screenshot 2](docs/sample_trade/screenshot_2.png) |
|:--:|:--:|
| ![Screenshot 3](docs/sample_trade/screenshot_3.png) | ![Screenshot 4](docs/sample_trade/screenshot_4.png) |

» [View Analysis Dashboard](https://arman-bd.github.io/tradepruf/docs/sample_trade/backtest_btc-eth-aapl.html)

## 📈 Custom Strategies
Create your own strategy by extending the base Strategy class:
Expand Down
299 changes: 149 additions & 150 deletions docs/sample_trade/backtest_btc-eth-aapl.html

Large diffs are not rendered by default.

Binary file added docs/sample_trade/screenshot_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sample_trade/screenshot_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sample_trade/screenshot_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/sample_trade/screenshot_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions src/visualization/enhanced_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def create_equity_curve(
fig.show()

return fig


def create_drawdown_chart(
self, equity_series: pd.Series, format: str = "html"
Expand Down Expand Up @@ -579,14 +580,22 @@ def create_monthly_returns_heatmap(
fig = go.Figure(
data=go.Heatmap(
z=returns_matrix.values,
x=returns_matrix.columns,
y=returns_matrix.index,
x=[f"{int(month):02d}" for month in returns_matrix.columns],
y=[str(year) for year in returns_matrix.index],
)
)

fig.update_layout(
title="Monthly Returns Heatmap",
xaxis_title="Month",
yaxis_title="Year",
height=400,
)

if format == "html":
fig.write_html(
f"monthly_returns_heatmap_{datetime.now().strftime('%Y%m%d_%H%M%S')}.html"
self.output_dir
/ f"monthly_returns_heatmap_{datetime.now().strftime('%Y%m%d_%H%M%S')}.html"
)
elif format == "interactive":
fig.show()
Expand Down

0 comments on commit 895b7e0

Please sign in to comment.