correct roi formula and data as of 16 may 2024
Browse files- data/all_trades_profitability.csv +2 -2
- data/fpmmTrades.csv +2 -2
- data/fpmms.csv +2 -2
- data/requests.csv +2 -2
- data/summary_profitability.csv +2 -2
- data/t_map.pkl +2 -2
- scripts/profitability.py +1 -1
- test.ipynb +0 -0
- test.py +0 -92
data/all_trades_profitability.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ea9047bacb53f4f2d396242ae39939517fde4b4061f425c992e981cc92c5b452
|
3 |
+
size 34257800
|
data/fpmmTrades.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6a297b050b6c7c88c8fe7d0c597f362b95c0af735f65ff3218e9c748bdcbb820
|
3 |
+
size 76092671
|
data/fpmms.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c313ba383cbff6ed1bdacadade252d9e5ae8b66359336c99b3ad7845842e533d
|
3 |
+
size 448312
|
data/requests.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:861e85f3437c0c75001e8b10731b91c643f0e0ef0bab214257c26d2a25fa9628
|
3 |
+
size 168361105
|
data/summary_profitability.csv
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:60f49e3d95e3abc0d93b7518e3287f9fbbe65211b3447ed21030ab4b5415c7a9
|
3 |
+
size 65116
|
data/t_map.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c1a007c0c28c3ab7cd85597a9cedde455c346b481adec25c6ab0223f50808c9c
|
3 |
+
size 7422234
|
scripts/profitability.py
CHANGED
@@ -532,7 +532,7 @@ def analyse_trader(
|
|
532 |
"num_mech_calls": num_mech_calls,
|
533 |
"mech_fee_amount": num_mech_calls * DEFAULT_MECH_FEE,
|
534 |
"net_earnings": net_earnings,
|
535 |
-
"roi": net_earnings / collateral_amount,
|
536 |
}
|
537 |
|
538 |
except Exception as e:
|
|
|
532 |
"num_mech_calls": num_mech_calls,
|
533 |
"mech_fee_amount": num_mech_calls * DEFAULT_MECH_FEE,
|
534 |
"net_earnings": net_earnings,
|
535 |
+
"roi": net_earnings / (collateral_amount + fee_amount + num_mech_calls * DEFAULT_MECH_FEE),
|
536 |
}
|
537 |
|
538 |
except Exception as e:
|
test.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
test.py
DELETED
@@ -1,92 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
import pandas as pd
|
3 |
-
|
4 |
-
|
5 |
-
demo = gr.Blocks()
|
6 |
-
|
7 |
-
data1 = pd.DataFrame({
|
8 |
-
"tool": ["tool1", "tool2", "tool3"],
|
9 |
-
"error": [0.1, 0.2, 0.3]
|
10 |
-
})
|
11 |
-
|
12 |
-
data2 = pd.DataFrame({
|
13 |
-
"tool": ["tool1", "tool2", "tool3", "tool4"],
|
14 |
-
"error": [0.1, 0.2, 0.3, 0.4]
|
15 |
-
})
|
16 |
-
|
17 |
-
data3 = pd.DataFrame({
|
18 |
-
"tool": ["tool1", "tool2", "tool3", "tool4", "tool5"],
|
19 |
-
"error": [0.1, 0.2, 0.3, 0.4, 0.5]
|
20 |
-
})
|
21 |
-
|
22 |
-
|
23 |
-
def update_plot1():
|
24 |
-
data = pd.DataFrame({
|
25 |
-
"tool": ["tool1", "tool2", "tool3", "tool4"],
|
26 |
-
"error": [0.1, 0.2, 0.3, 0.4]
|
27 |
-
})
|
28 |
-
return gr.BarPlot(
|
29 |
-
data,
|
30 |
-
x="tool",
|
31 |
-
y="error"
|
32 |
-
)
|
33 |
-
|
34 |
-
def update_plot2():
|
35 |
-
data = pd.DataFrame({
|
36 |
-
"tool": ["tool1", "tool2", "tool3", "tool4", "tool5"],
|
37 |
-
"error": [0.1, 0.2, 0.3, 0.4, 0.5]
|
38 |
-
})
|
39 |
-
return gr.BarPlot(
|
40 |
-
data,
|
41 |
-
x="tool",
|
42 |
-
y="error"
|
43 |
-
)
|
44 |
-
|
45 |
-
def update_plot3():
|
46 |
-
data = pd.DataFrame({
|
47 |
-
"tool": ["tool1", "tool2", "tool3", "tool4", "tool5", "tool6"],
|
48 |
-
"error": [0.1, 0.2, 0.3, 0.4, 0.5, 0.6]
|
49 |
-
})
|
50 |
-
return gr.BarPlot(
|
51 |
-
data,
|
52 |
-
x="tool",
|
53 |
-
y="error"
|
54 |
-
)
|
55 |
-
|
56 |
-
def update_plots():
|
57 |
-
return update_plot1(), update_plot2(), update_plot3()
|
58 |
-
|
59 |
-
with demo:
|
60 |
-
with gr.Row():
|
61 |
-
plot1 = gr.BarPlot(
|
62 |
-
data1,
|
63 |
-
x="tool",
|
64 |
-
y="error"
|
65 |
-
)
|
66 |
-
|
67 |
-
with gr.Row():
|
68 |
-
plot2 = gr.BarPlot(
|
69 |
-
data2,
|
70 |
-
x="tool",
|
71 |
-
y="error"
|
72 |
-
)
|
73 |
-
|
74 |
-
with gr.Row():
|
75 |
-
plot3 = gr.BarPlot(
|
76 |
-
data3,
|
77 |
-
x="tool",
|
78 |
-
y="error"
|
79 |
-
)
|
80 |
-
|
81 |
-
with gr.Row():
|
82 |
-
update_button = gr.Button("Update")
|
83 |
-
|
84 |
-
update_button.click(
|
85 |
-
update_plots,
|
86 |
-
inputs=[],
|
87 |
-
outputs=[plot1, plot2, plot3]
|
88 |
-
)
|
89 |
-
|
90 |
-
demo.launch(
|
91 |
-
debug=True
|
92 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|