Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,11 +5,11 @@ import os
|
|
| 5 |
|
| 6 |
def create_portfolio_graph(amount):
|
| 7 |
# Calculate positions based on the provided amount
|
| 8 |
-
long_position = os.
|
| 9 |
-
short_position = os.
|
| 10 |
|
| 11 |
# Data for the bars
|
| 12 |
-
positions = ['
|
| 13 |
percentages = [long_position, short_position]
|
| 14 |
|
| 15 |
data = pd.DataFrame({'Position': positions, 'Percentage': percentages})
|
|
|
|
| 5 |
|
| 6 |
def create_portfolio_graph(amount):
|
| 7 |
# Calculate positions based on the provided amount
|
| 8 |
+
long_position = os.getenv['LONG_PORTION'] * amount
|
| 9 |
+
short_position = os.getenv['SHORT_PORTION']* amount
|
| 10 |
|
| 11 |
# Data for the bars
|
| 12 |
+
positions = ['Long Position', 'Short Position']
|
| 13 |
percentages = [long_position, short_position]
|
| 14 |
|
| 15 |
data = pd.DataFrame({'Position': positions, 'Percentage': percentages})
|