From 548aa8bc3007a8d80773815f59128891ea0ebe78 Mon Sep 17 00:00:00 2001 From: jookie Date: Sat, 31 Aug 2024 12:14:14 -0400 Subject: [PATCH] fix commit --- README.md | 7 +++--- README_RUN_PY => READMEaetupColab | 40 +++++++++++++++++++++++++++++++ READMExperiment.md | 40 ------------------------------- 3 files changed, 43 insertions(+), 44 deletions(-) rename README_RUN_PY => READMEaetupColab (72%) diff --git a/README.md b/README.md index 482bc7f..069008e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@
AI StockBot
-
- StockBot Powered by JojoFam: Lightning Fast AI Chatbot that Responds With Live Interactive Stock Charts, Financials, News, Screeners, and More + Jojo has three layers: market environments, agents, and applications. For a trading task (on the top), an agent (in the middle) interacts with a market environment (at the bottom), making sequential decisions.
@@ -19,8 +18,8 @@ ## JojoFin JojoFin is library designed to facilitate financial trading strategies using deep reinforcement learning (DRL). It is tailored specifically for quantitative finance, providing tools and frameworks for traderss to create, test, and implement trading dtrategis using DRL techniques.
-[Demo of StockBot](https://github.com/user-attachments/assets/a50fa266-5ae9-4869-a37f-599d7db790d9) -> Demo of StockBot providing relevant, live, and interactive stock charts and interfaces +[Experiments of StockBot](READMExperiment.md) +> Experiment of StockBot providing relevant, live, and interactive stock charts and interfaces ## Overview diff --git a/README_RUN_PY b/READMEaetupColab similarity index 72% rename from README_RUN_PY rename to READMEaetupColab index ffbe14a..b280018 100644 --- a/README_RUN_PY +++ b/READMEaetupColab @@ -1,4 +1,44 @@ + + +## Dependencies + +- [Python 3 ](https://www.python.org/downloads/) +- [Alpaca SDK](https://alpaca.markets/) +- [Vercel](https://vercel.com) +- [Firebase Template](https://github.com/llSourcell/firebase_react_startup_template) *optional* + +## Setup Instructions + +1. Download the iPython notebook in this repository and upload it to [Colab](colab.research.google.com) to try it out. +2. Setup a simple [flask](https://flask.palletsprojects.com/en/1.1.x/quickstart/) app. +3. To set up a cron job for a Flask app deployed on Vercel that executes a Google Colab notebook at a given link every hour, you can use the built-in Vercel cron feature. Here are the steps to follow: +4. In your Flask app, import the necessary modules to run the Colab notebook, such as gdown or pyngrok +5. Create a new endpoint in your Flask app that triggers the execution of the Colab notebook, using the link to the notebook file. +6. Go to the Vercel project settings for your app and navigate to the "Cron" tab. +7. Create a new cron job that runs every hour by adding the endpoint you created in step 2 to the "Cron Job" field and select the frequency you want to run the job. + +Here is a sample code snippet for step 2: + +```python + +from flask import Flask, jsonify +import gdown +app = Flask(__name__) + +@app.route('/run-colab') +def run_colab(): + gdown.download('https://drive.google.com/file/d/', 'colab.ipynb', quiet=False) + return jsonify(message='colab notebook ran successfully') + +``` + +## Credits & More Resources + +Credits for the notebook go to the Jojo Foundation, and for the API go to Alpaca. + + + ## 🗒️ Answer Here’s how you can implement a serverless function in a Next.js React TypeScript component to run a Python script when a button is pressed. The response from the server will be displayed in a text element. diff --git a/READMExperiment.md b/READMExperiment.md index c028383..486df05 100644 --- a/READMExperiment.md +++ b/READMExperiment.md @@ -12,43 +12,3 @@ I gave this trading bot $2000 because I was willing to lose $2000 to make a grea 5. If the expectd returns are above a certain threshold, buy, else hold. If they're below a certain threshold, sell. (using Alpaca API) In order to have this Colab run automatically once a day, we can deploy it to a hosting platform like Vercel with a seperate file that repeatedly executes it. - -![alt text](https://i.ibb.co/4KJx9y0/Screen-Shot-2023-01-13-at-10-04-39-AM.png) - - -## Dependencies - -- [Python 3.7](https://www.python.org/downloads/) -- [Alpaca SDK](https://alpaca.markets/) -- [FinRL](https://github.com/AI4Finance-Foundation/FinRL) -- [Vercel](https://vercel.com) -- [Firebase Template](https://github.com/llSourcell/firebase_react_startup_template) *optional* - -## Setup Instructions - -1. Download the iPython notebook in this repository and upload it to [Colab](colab.research.google.com) to try it out. -2. Setup a simple [flask](https://flask.palletsprojects.com/en/1.1.x/quickstart/) app. -3. To set up a cron job for a Flask app deployed on Vercel that executes a Google Colab notebook at a given link every hour, you can use the built-in Vercel cron feature. Here are the steps to follow: -4. In your Flask app, import the necessary modules to run the Colab notebook, such as gdown or pyngrok -5. Create a new endpoint in your Flask app that triggers the execution of the Colab notebook, using the link to the notebook file. -6. Go to the Vercel project settings for your app and navigate to the "Cron" tab. -7. Create a new cron job that runs every hour by adding the endpoint you created in step 2 to the "Cron Job" field and select the frequency you want to run the job. - -Here is a sample code snippet for step 2: - -```python - -from flask import Flask, jsonify -import gdown -app = Flask(__name__) - -@app.route('/run-colab') -def run_colab(): - gdown.download('https://drive.google.com/file/d/', 'colab.ipynb', quiet=False) - return jsonify(message='colab notebook ran successfully') - -``` - -## Credits & More Resources - -Credits for the notebook go to the Jojo Foundation, and for the API go to Alpaca.