Skip to content

Commit 0d4b04a

Browse files
authored
Save strategies as part of the backtest report (#302)
* Update readme and add class inspection * Add init app command * Add app web support * Add jupyter notebook check * Fix flake8 warnings * Add exclusion for flake8
1 parent 987992b commit 0d4b04a

24 files changed

+800
-314
lines changed

.flake8

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[flake8]
22
exclude =
33
investing_algorithm_framework/domain/utils/backtesting.py
4+
investing_algorithm_framework/infrastructure/database/sql_alchemy.py
45
examples

README.md

+52-14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
<br/>
2+
<div align="center">
3+
<h1><a href="https://investing-algorithm-framework.com" target="_blank">Investing Algorithm Framework</a></h4>
4+
</div>
5+
<br/>
6+
7+
<div align="center">
8+
<b>Rapidly build and deploy quantitative strategies and trading bots</b>
9+
</div>
10+
<br/>
11+
12+
<p align="center">
13+
<a target="_blank" href="https://investing-algorithm-framework.com">View Docs</a>
14+
<a href="https://investing-algorithm-framework.com/Getting%20Started/installation)">Getting Started</a>
15+
</p>
16+
17+
---
18+
119
<a href=https://investing-algorithm-framework.com><img src="https://img.shields.io/badge/docs-website-brightgreen"></a>
220
[![Build](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml/badge.svg)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml)
321
[![Tests](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
@@ -6,10 +24,6 @@
624
<a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a> <br/>
725
[![GitHub stars](https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework.svg?style=social&label=Star&maxAge=1)](https://github.com/SeaQL/sea-orm/stargazers/) If you like what we do, consider starring, sharing and contributing!
826

9-
# [Investing Algorithm Framework](https://github.com/coding-kitties/investing-algorithm-framework)
10-
11-
The Investing Algorithm Framework is a Python framework that enables swift and elegant development of trading bots.
12-
1327
## Sponsors
1428

1529
<a href="https://www.finterion.com/" target="_blank">
@@ -22,7 +36,7 @@ The Investing Algorithm Framework is a Python framework that enables swift and e
2236

2337
## Features and planned features:
2438

25-
- [x] **Based on Python 3.9+**: Windows, macOS and Linux.
39+
- [x] **Based on Python 3.10+**: Windows, macOS and Linux.
2640
- [x] **Documentation**: [Documentation](https://investing-algorithm-framework.com)
2741
- [x] **Persistence of portfolios, orders, positions and trades**: Persistence is achieved through sqlite.
2842
- [x] **Limit orders**: Create limit orders for buying and selling.
@@ -33,7 +47,7 @@ The Investing Algorithm Framework is a Python framework that enables swift and e
3347
- [x] **Live trading**: Live trading.
3448
- [x] **Backtesting and performance analysis reports** [example](./examples/backtest_example)
3549
- [x] **Backtesting multiple algorithms with different backtest date ranges** [example](./examples/backtests_example)
36-
- [x] **Backtest comparison and experiments**: Compare multiple backtests and run experiments.
50+
- [x] **Backtesting and results evaluation**: Compare multiple backtests and run experiments. Save and load backtests. Save strategies as part of the backtest. [docs](https://investing-algorithm-framework.com/Getting%20Started/backtesting)
3751
- [x] **Order execution**: Currently support for a wide range of crypto exchanges through [ccxt](https://github.com/ccxt/ccxt) (Support for traditional asset brokers is planned).
3852
- [x] **Web API**: Rest API for interacting with your deployed trading bot
3953
- [x] **PyIndicators**: Works natively with [PyIndicators](https://github.com/coding-kitties/PyIndicators) for technical analysis on your Pandas and Polars dataframes.
@@ -45,6 +59,38 @@ The Investing Algorithm Framework is a Python framework that enables swift and e
4559
- [ ] **AWS Lambda support (Planned)**: Stateless running for cloud function deployments in AWS.
4660
- [ ] **Azure App services support (Planned)**: deployments in Azure app services with Web UI.
4761

62+
## Quickstart
63+
64+
1. First install the framework using `pip`. The Investing Algorithm Framework is hosted on [PyPi](https://pypi.org/project/Blankly/).
65+
66+
```bash
67+
$ pip install investing-algorithm-framework
68+
```
69+
70+
2. Next, just run:
71+
72+
```bash
73+
$ investing-algorithm-framewor init
74+
```
75+
76+
or if you want the web version:
77+
78+
```bash
79+
$ investing-algorithm-framework init --web
80+
```
81+
> You can always change the app to the web version by changing the `app.py` file.
82+
83+
The command will create the file `app.py` and an example script called `strategy.py`.
84+
85+
From there, you start building your trading bot in the `strategy.py`.
86+
87+
More information can be found on our [docs](https://docs.blankly.finance)
88+
89+
> Make sure you leave the `app.py` file as is, as it is the entry point for the framework.
90+
> You can change the `bot.py` file to your liking and add other files to the working directory.
91+
> The framework will automatically pick up the files in the working directory.
92+
```
93+
4894
## Example implementation
4995
5096
The following algorithm connects to binance and buys BTC every 2 hours.
@@ -262,14 +308,6 @@ app.add_portfolio_configuration(
262308
We are continuously working on improving the performance of the framework. If
263309
you have any suggestions, please let us know.
264310
265-
## How to install
266-
267-
You can download the framework with pypi.
268-
269-
```bash
270-
pip install investing-algorithm-framework
271-
```
272-
273311
## Installation for local development
274312
275313
The framework is built with poetry. To install the framework for local development, you can run the following commands:

examples/app.py

-49
This file was deleted.

0 commit comments

Comments
 (0)