loocurse / quant-crunch

Project 32 SUTD Capstone
0 stars 0 forks source link

API endpoints #8

Open loocurse opened 3 years ago

loocurse commented 3 years ago

Here are some API endpoints that I'll need. Can add more and advise accordingly thanks!

Ticker List

For the search bar purposes, will need to get a list of all the tickers that we are using.

tickerData = [
  { symbol: "BABA", market:"NYSE", name: "Alibaba Group Holding Ltd" , change_number: -2.33, change_per: -2.3, price:140.23},
  { symbol: "LMND", market:"NYSE", name: "Lemonade Inc" , change_number: 3.53, change_per: 4.32, price:150.23}, ...
];

Recommendations

image

Algorithm past performance

For the 'performance' tab. image

For each trade

Example:

const performance = [
  { month: "Jull 2021", realized_pnl: 2.33, positions:[
    { ticker: "AAPL", buy: 100, sell: 150, pnl: 50, notes: "Reached target price" },
    { ticker: "TSLA", buy: 400, sell: 390, pnl: -4.20, notes: "Reached stop loss" },
  ] }, ...
];

Also @leo-dh for the journal tab I realised we might have to set up a persistent database for the journal part. Maybe I won't develop that part for the time being, focus on the algorithms

leo-dh commented 3 years ago

Endpoints Checklist

The second and third endpoint needs further discussion.

@ktingyew How do you think we should translate the current output of the model into entry price, stop loss and target price? Stop loss and target price can be fixed in relation to the entry price. The main concern is with translating the state machine into appropriate buy signals.

leo-dh commented 3 years ago

@ktingyew @Mickey1356 Potential schema for predictions:

{
    date: datetime isoformat/unix timestamp,
    recommendations: [
        {
            symbol: 'AAPL',
            targetPrice: '123',
            currentPrice: '456',
        },
        ...
    ],
}
mickey1356 commented 3 years ago

ok