Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac arm64 #10

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
08f7536
adjust config to Mac M1 arch64
GianniGithub Nov 2, 2021
c05cdab
Add my experimentel Files to Git
GianniGithub Nov 12, 2021
e01b35b
ch4 got SMA
GianniGithub Nov 12, 2021
9a75405
Got pandas more
GianniGithub Nov 13, 2021
8e6705a
understand growing normilizer and pandas math.
GianniGithub Nov 13, 2021
5c0faa2
Understand chap04
GianniGithub Nov 15, 2021
63656ed
Now able to plot in pycharm
GianniGithub Nov 15, 2021
fe240b1
understand Mean Reversion.
GianniGithub Nov 22, 2021
1382480
3comma stragies
GianniGithub Jan 25, 2022
ce225cf
3comma Signals setup
GianniGithub Jan 26, 2022
64abb98
3comma saftyOrder Methode definiert
GianniGithub Feb 3, 2022
7597692
3comma test system integrated
GianniGithub Feb 4, 2022
cf460b8
3comma tests working
GianniGithub Feb 5, 2022
fe60664
3comma real Data Test working
GianniGithub Feb 8, 2022
627fc24
3comma Signals added
GianniGithub Feb 10, 2022
689329c
3comma Signals now prepared for backtesting
GianniGithub Feb 14, 2022
2b439f5
3comma backtesting runns, import problem with date fix
GianniGithub Feb 15, 2022
00331d7
3comma problem with brute
GianniGithub Feb 16, 2022
361632c
3comma runs only unpickeld
GianniGithub Feb 16, 2022
50a4d5a
3comma done with profit result
GianniGithub Feb 16, 2022
0029bea
3comma done with real Chart Data
GianniGithub Feb 17, 2022
20acf3a
3comma try to run on server
GianniGithub Feb 18, 2022
2f4c2f5
3comma try with telegrambot
GianniGithub Feb 18, 2022
5225ff3
3comma fixed price deviation Error
GianniGithub Feb 18, 2022
41be04a
3comma Unit tests created
GianniGithub Feb 18, 2022
79333da
3comma - Auto created run docker
GianniGithub Feb 19, 2022
672e441
3comma - bug with imports fix, linux runscripts added
GianniGithub Feb 19, 2022
98fee5f
3comma - bug with file names fixed on container, test created for run…
GianniGithub Feb 19, 2022
f9d72da
3comma - create auto generated server with digitalocean and this API
GianniGithub Feb 20, 2022
6b6f1a0
3comma -bug with volumenscale fixed
GianniGithub Feb 20, 2022
e8846d6
3comma -created auto docker creater and destroyer for digitalOcean
GianniGithub Feb 21, 2022
f3b6122
3comma -polishing
GianniGithub Feb 22, 2022
d7a4eff
3comma - added capital limit
GianniGithub Feb 23, 2022
9c500e0
3comma - clean tests
GianniGithub Feb 23, 2022
c3c1cc5
3comma - dockers running now also of digitalocean
GianniGithub Feb 23, 2022
4f04f60
3comma - add chart data (not in git) clean docker image (add dockerig…
GianniGithub Feb 24, 2022
b6937e3
3comma - testable with other coins now
GianniGithub Feb 27, 2022
393c291
3comma - print telegram from python
GianniGithub Feb 27, 2022
32f7a54
3comma - run more coin overfitting calculation
GianniGithub Feb 27, 2022
3866b2f
3comma - print result polishing
GianniGithub Feb 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
3comma done with real Chart Data
  • Loading branch information
GianniGithub committed Feb 17, 2022
commit 0029bea920f1364ac891205de137550b933d5ffa
32 changes: 24 additions & 8 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions MyExperiments/DCA_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ def update_and_run(self, rranges, start_base_size, safety_order_size, max_active
# DCABot.s_result.put((result["uPNL"].sum(), result['Profit'].iloc[-1]))

try:
result["sum_profit"] = result["Profit"].cumsum()
win = result['Profit'].iloc[-1] - result["uPNL"].sum()
win = result['Profit'].sum() - result["uPNL"].sum()
except:
print("empty")
return -10000
return win
return -win
29 changes: 16 additions & 13 deletions MyExperiments/Run_backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def fake_data_test():


def backtest():
data = get_data_from_file('2019-10-04', '2022-01-06', "Binance_BTCUSDT_1h_format.csv")
data = get_data_from_file('2019-03-04', '2022-01-06', "Binance_BTCUSDT_1h_format.csv")
btc_test = DCABot(data, 0.01)
btc_test.get_signals()
kwargs = {"start_base_size": 10,
Expand All @@ -73,10 +73,10 @@ def backtest():


def back_overfitting():
#data = get_data_from_file('2021-10-04', '2022-01-06', "Binance_BTCUSDT_1h_format.csv")
data = generate_simpel_sample_momentum()
data = get_data_from_file('2021-03-04', '2022-01-06', "Binance_BTCUSDT_1h_format.csv")
#data = generate_simpel_sample_momentum()
btc_test = DCABot(data, 0.01)
#btc_test.get_signals()
btc_test.get_signals()
# args

start_base_size = 10
Expand All @@ -96,17 +96,20 @@ def back_overfitting():


def test_back_overfitting():
data = generate_simpel_sample_momentum()
lala = SaftyOrder(data, 0.01)
data = get_data_from_file('2021-03-04', '2022-01-06', "Binance_BTCUSDT_1h_format.csv")
#data = generate_simpel_sample_momentum()
btc_test = DCABot(data, 0.01)
btc_test.get_signals()
kwargs = {"start_base_size": 10,
"safety_order_size": 20,
"max_active_safety_trades_count": 10, # uninteresting
"safety_order_volume_scale": 1.4,
"price_deviation": 1,
"max_safety_trades_count": 2,
"safety_order_step_scale": 1.1}
result = lala.calc_times_for_each_signal(kwargs)
print(result)
"price_deviation": 1.8,
"max_safety_trades_count": 13,
"safety_order_step_scale": 1}
result = btc_test.calc_times_for_each_signal(kwargs)
print("Profit Total: " + str(result["Profit"].sum()))
print("Deals Total: " + str(len(result)))
print("End")


Expand All @@ -115,8 +118,8 @@ def test_back_overfitting():
# fake_data_test()
# real_data_test()
# backtest()
back_overfitting()
# test_back_overfitting()
#back_overfitting()
test_back_overfitting()
except:
print("Error")
raise
Expand Down
7 changes: 5 additions & 2 deletions MyExperiments/Three_commasDCA_safety_order_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def calc_safety_orders(self,
take_profit_price,
max_safety_trades_counter,
self.take_profit_percent,
safety_buys["payed_Sum"].iloc[-1],
profit=profit)

if max_safety_trades_counter >= max_safety_trades_count:
Expand Down Expand Up @@ -100,6 +101,7 @@ def calc_safety_orders(self,
take_profit_price,
max_safety_trades_counter,
self.take_profit_percent,
safety_buys["payed_Sum"].iloc[-1],
uPNL=uPNL,)

def calc_times_for_each_signal(self, args):
Expand Down Expand Up @@ -136,7 +138,7 @@ def plot_results(self):
plt.show()


def prepare_return_values(signal_enter_df, exit_index, price_exit, max_safety_trades_counter, percent,
def prepare_return_values(signal_enter_df, exit_index, price_exit, max_safety_trades_counter, percent, payed,
profit=0,
uPNL=0, ):
return {"Created": signal_enter_df.index[0],
Expand All @@ -147,4 +149,5 @@ def prepare_return_values(signal_enter_df, exit_index, price_exit, max_safety_tr
"max_safety_trades_counter": max_safety_trades_counter,
"in_Percent": percent,
"uPNL": uPNL,
"Profit": profit}
"Profit": profit,
"Payed Deal Sum": payed}