Commit Graph

12349 Commits

Author SHA1 Message Date
Sam Germain
6083568d56 Updated interest and ratio calculations to correct functions 2021-07-10 20:44:57 -06:00
Sam Germain
2bcfaabcf8 test prsistence leverage passes with new ratio calc 2021-07-08 05:59:13 -06:00
Sam Germain
c753bd0ddc updated ratio_calc_profit function 2021-07-08 05:37:54 -06:00
Sam Germain
e7d6fac553 Added docstrings to methods 2021-07-08 00:51:41 -06:00
Sam Germain
963bb89087 ran isort . 2021-07-08 00:12:39 -06:00
Sam Germain
e1fca320e6 passed mypy 2021-07-07 22:51:10 -06:00
Sam Germain
8f5150e831 Flake8 compliant 2021-07-07 22:24:30 -06:00
Sam Germain
769f72e5ee All persistence margin tests pass 2021-07-07 21:14:08 -06:00
Sam Germain
79d394058f Changed InterestMode enum implementation 2021-07-07 21:04:38 -06:00
Sam Germain
03595bf951 Took liquidation price out of order 2021-07-07 20:21:02 -06:00
Sam Germain
057c380597 uncommented liquidation_price in order object 2021-07-07 01:30:42 -06:00
Sam Germain
0d6210c837 Moved leverage and is_short variables out of trade constructors and into conftest 2021-07-07 01:06:51 -06:00
Sam Germain
26ee6470f4 Pass all but one test, because sqalchemy messes up 2021-07-07 00:43:06 -06:00
Sam Germain
11f5dae143 set initial_stop_loss in stoploss helper 2021-07-06 22:34:08 -06:00
Sam Germain
ea4271ef34 Tried to add liquidation price to order object, caused a test to fail 2021-07-06 00:43:01 -06:00
Sam Germain
925558b6b0 updated timezone.utc time 2021-07-06 00:18:03 -06:00
Sam Germain
d73473d45c updated todos 2021-07-06 00:11:43 -06:00
Sam Germain
2fedbfbcd2 Added checks for making sure stop_loss doesn't go below liquidation_price 2021-07-06 00:07:14 -06:00
Sam Germain
f607920ad6 test_adjust_stop_loss_short passes 2021-07-05 22:43:51 -06:00
Sam Germain
0f2952e90c made leveraged test names unique 2021-07-05 22:11:52 -06:00
Sam Germain
9ca588c780 test_update_market_order for shorts passes 2021-07-05 22:01:46 -06:00
Sam Germain
116eeb050f Moved interest calculation to an enum 2021-07-05 21:48:56 -06:00
Sam Germain
4984595ddf Merge branch 'develop' into margin-db 2021-07-05 01:04:21 -06:00
Sam Germain
01eb42b1af updated leverage.md 2021-07-05 00:56:32 -06:00
Sam Germain
23d236878d uncommented a test, switched last short test to be more correct 2021-07-05 00:53:58 -06:00
Sam Germain
189356a340 Merge branch 'margin-db' of https://github.com/samgermain/freqtrade into margin-db 2021-07-04 23:52:15 -06:00
Sam Germain
e7612a7eff Switched migrations.py check for stake_currency back to open_rate, because stake_currency is no longer a variable 2021-07-04 23:51:58 -06:00
Sam Germain
42dbb1fb6b Removed exchange file modifications 2021-07-04 23:50:59 -06:00
Sam Germain
7ab8c1d1fd fixed rpc_apiserver test fails, changed test_persistence_long to test_persistence_leverage 2021-07-04 23:32:55 -06:00
Sam Germain
20b806528f Set default leverage to 1.0 2021-07-04 23:12:07 -06:00
Matthias
70a41a0f67
Merge pull request #5239 from freqtrade/dependabot/pip/develop/python-telegram-bot-13.7
Bump python-telegram-bot from 13.6 to 13.7
2021-07-05 07:06:28 +02:00
Matthias
eb3ead4930
Merge pull request #5229 from kevinjulian/telegram-balance
compact low balance currencies
2021-07-05 06:56:35 +02:00
dependabot[bot]
ac7598ff14
Bump python-telegram-bot from 13.6 to 13.7
Bumps [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot) from 13.6 to 13.7.
- [Release notes](https://github.com/python-telegram-bot/python-telegram-bot/releases)
- [Changelog](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/CHANGES.rst)
- [Commits](https://github.com/python-telegram-bot/python-telegram-bot/compare/v13.6...v13.7)

---
updated-dependencies:
- dependency-name: python-telegram-bot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 04:31:00 +00:00
Matthias
94ec9d2366
Merge pull request #5237 from freqtrade/dependabot/pip/develop/sqlalchemy-1.4.20
Bump sqlalchemy from 1.4.19 to 1.4.20
2021-07-05 06:29:58 +02:00
Matthias
6c789e4130
Merge pull request #5236 from freqtrade/dependabot/pip/develop/ccxt-1.52.40
Bump ccxt from 1.52.4 to 1.52.40
2021-07-05 06:29:39 +02:00
Matthias
1e696c4a20
Merge pull request #5235 from freqtrade/dependabot/pip/develop/plotly-5.1.0
Bump plotly from 5.0.0 to 5.1.0
2021-07-05 06:29:19 +02:00
Matthias
d146697297
Merge pull request #5238 from freqtrade/dependabot/pip/develop/fastapi-0.66.0
Bump fastapi from 0.65.2 to 0.66.0
2021-07-05 06:28:56 +02:00
Sam Germain
d84534cd96 Long tests passing 2021-07-04 22:14:00 -06:00
Sam Germain
d9084accf9 Long tests passing 2021-07-04 22:09:16 -06:00
dependabot[bot]
d1555a1095
Bump fastapi from 0.65.2 to 0.66.0
Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.65.2 to 0.66.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](https://github.com/tiangolo/fastapi/compare/0.65.2...0.66.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 03:01:28 +00:00
dependabot[bot]
7ae5f47242
Bump sqlalchemy from 1.4.19 to 1.4.20
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.4.19 to 1.4.20.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

---
updated-dependencies:
- dependency-name: sqlalchemy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 03:01:24 +00:00
dependabot[bot]
2f97846bd8
Bump ccxt from 1.52.4 to 1.52.40
Bumps [ccxt](https://github.com/ccxt/ccxt) from 1.52.4 to 1.52.40.
- [Release notes](https://github.com/ccxt/ccxt/releases)
- [Changelog](https://github.com/ccxt/ccxt/blob/master/exchanges.cfg)
- [Commits](https://github.com/ccxt/ccxt/compare/1.52.4...1.52.40)

---
updated-dependencies:
- dependency-name: ccxt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 03:01:18 +00:00
dependabot[bot]
0d787fde58
Bump plotly from 5.0.0 to 5.1.0
Bumps [plotly](https://github.com/plotly/plotly.py) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/plotly/plotly.py/releases)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotly/plotly.py/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: plotly
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 03:01:11 +00:00
Matthias
d758b0ccab
Merge pull request #5232 from octaviusgus/patch-1
Daily profit plotting / equity curve
2021-07-04 20:00:44 +02:00
Matthias
c5489d530a Reexport File to docs to have this available as documentation too 2021-07-04 19:50:44 +02:00
kevinjulian
c3cf71bba8 sort import 2021-07-04 22:04:39 +07:00
kevinjulian
9e548657e0 fix testcase 2021-07-04 21:08:46 +07:00
octaviusgus
558bcc7959 Jupyter notebook snippet: Plotting daily profit / equity line 2021-07-04 15:56:55 +02:00
octaviusgus
4aa2ae37bd
add daily_profit_list
added extra key daily_profit in return of optimize_reports.generate_daily_stats
this allows us to analyze and plot a daily profit chart / equity line using snippet below inside jupyter notebook

```
# Plotting equity line (starting with 0 on day 1 and adding daily profit for each backtested day)

from freqtrade.configuration import Configuration
from freqtrade.data.btanalysis import load_backtest_data, load_backtest_stats
import plotly.express as px
import pandas as pd

# strategy = 'Strat'
# config = Configuration.from_files(["user_data/config.json"])
# backtest_dir = config["user_data_dir"] / "backtest_results"

stats = load_backtest_stats(backtest_dir)
strategy_stats = stats['strategy'][strategy]

equity = 0
equity_daily = []
for dp in strategy_stats['daily_profit']:
    equity_daily.append(equity)
    equity += float(dp)

dates = pd.date_range(strategy_stats['backtest_start'], strategy_stats['backtest_end'])

df = pd.DataFrame({'dates':dates,'equity_daily':equity_daily})

fig = px.line(df, x="dates", y="equity_daily")
fig.show()

```
2021-07-04 14:38:17 +02:00
Matthias
791dfd9ba3 Fix some doc typos 2021-07-04 14:02:11 +02:00