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

Mean Reversion Backend Endpoint #6

Open
theDe-bugger opened this issue Nov 17, 2023 · 0 comments
Open

Mean Reversion Backend Endpoint #6

theDe-bugger opened this issue Nov 17, 2023 · 0 comments
Assignees
Labels
backend stat Any statistical analysis tickets

Comments

@theDe-bugger
Copy link
Contributor

Description

Need a backend endpoint that the site can access to test the mean reversion strategies for a specific stock and time frame.

Overall:

  • Krish made a function to apply mean reversion to a stock for a given time frame and return a list of buy/sell dates
  • You need to discuss this with him and create a REST API that takes the specified parameters and returns a list of buy/sell dates that we can portray on the graph
  • It's pretty simple if Krish has his function ready to go
  • Just take in params, retrieve data from polygon endpoint, pass in the data to krish's function along with stock and time frame, and his function should return the list of trades which you can format as shown below and return

We need to make GET request!

Endpoint

'/api/meanreversion'

Params

  • stock ticker
  • time frame (last month, last week, last day)

Return

  • returns list of buy/sell trades in the format shown it the example below

Example Call

GET /api/meanreversion
with params:

  • stock = AAPL
  • timeframe= last_month

Example Return

results :
{
'trade1' : {
'action': 'buy' or 'sell',
'time': 'dd/mm/yyyy hh:mm:ss"
},
'trade2' : {
'action': 'buy' or 'sell',
'time': 'dd/mm/yyyy hh:mm:ss"
}
.
.
.
}

Error Handling

For any error, just throw 400

@theDe-bugger theDe-bugger added stat Any statistical analysis tickets backend labels Nov 17, 2023
@theDe-bugger theDe-bugger assigned KrishM123 and arshvirc and unassigned arshvirc and KrishM123 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend stat Any statistical analysis tickets
Projects
None yet
Development

No branches or pull requests

3 participants