This service runs after the market is closed (after 3pm) so we can include the latest daily data. We will start by running it at 7 pm and see if we need to move it a little bit earlier. So the trigger here is time.
Task
This service screens/filters the market for potential plays according to our parameters. It will give us a list of stocks that match our strategy(ies). We persist this list in DynamoDB where it will be picked up by another service.
π€ Buy Lambda Function
Trigger
This function is scheduled to run at 7 am. More about cron jobs in AWS.
Task
At a high level, this function would place buy orders for stocks of interest. The implementation of it might be a two step one, though. Hitting DynamoDB might be an "event".
Its only job is to close a position: either before market open (or first thing when it does), or the stop loss, or take profit trigger is hit.
Interface
close(symbol, price=market)symbol: the stock ticker symbol.
price: by default, we'll close at market price.
β Analysis Service
Trigger
This service is scheduled to run intra-day: between 8 am - 3:30 pm, when the market is open.
Task
This service analyzes each position in the portfolio one by one (probably on an hourly basis). According to our strategy, we don't expect to close a position intra-day.
π Screener Service
Trigger
This service runs after the market is closed (after 3pm) so we can include the latest daily data. We will start by running it at 7 pm and see if we need to move it a little bit earlier. So the trigger here is time.
Task
This service screens/filters the market for potential plays according to our parameters. It will give us a list of stocks that match our strategy(ies). We persist this list in DynamoDB where it will be picked up by another service.
π€ Buy Lambda Function
Trigger
This function is scheduled to run at 7 am. More about cron jobs in AWS.
Task
At a high level, this function would place
buy
orders for stocks of interest. The implementation of it might be a two step one, though. Hitting DynamoDB might be an "event".π Sell Lambda Function
Trigger
There multiple triggers:
Task
Its only job is to close a position: either before market open (or first thing when it does), or the stop loss, or take profit trigger is hit.
Interface
close(symbol, price=market)
symbol
: the stock ticker symbol.price
: by default, we'll close at market price.β Analysis Service
Trigger
This service is scheduled to run intra-day: between 8 am - 3:30 pm, when the market is open.
Task
This service analyzes each position in the portfolio one by one (probably on an hourly basis). According to our strategy, we don't expect to close a position intra-day.