Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,11 @@ from Gradio_UI import GradioUI
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
-
def get_stock_signal(symbol: str, interval: str):
|
| 14 |
"""Retrieves intraday stock data for the given symbol using the Alpha Vantage API, computes exponential moving averages (EMA), and generates a trading signal based on an EMA crossover strategy.
|
| 15 |
Args:
|
| 16 |
symbol: A string representing the stock symbol to analyze (e.g., "AAPL", "GOOG", "MSFT", "TSLA").
|
| 17 |
interval: A string representing the time interval between data points (e.g., "1min", "5min", "15min", "60min").
|
| 18 |
-
Returns:
|
| 19 |
-
str: A complete sentence summarizing the latest closing price and the recommended trading decision (Buy, Sell, or Hold).
|
| 20 |
"""
|
| 21 |
API_KEY = 'RG9XKRIYBL2EV3V3'
|
| 22 |
|
|
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
+
def get_stock_signal(symbol: str, interval: str) -> str:
|
| 14 |
"""Retrieves intraday stock data for the given symbol using the Alpha Vantage API, computes exponential moving averages (EMA), and generates a trading signal based on an EMA crossover strategy.
|
| 15 |
Args:
|
| 16 |
symbol: A string representing the stock symbol to analyze (e.g., "AAPL", "GOOG", "MSFT", "TSLA").
|
| 17 |
interval: A string representing the time interval between data points (e.g., "1min", "5min", "15min", "60min").
|
|
|
|
|
|
|
| 18 |
"""
|
| 19 |
API_KEY = 'RG9XKRIYBL2EV3V3'
|
| 20 |
|