nga-27 / SecuritiesAnalysisTools

Technical analysis tools app for analyzing securities (funds, stocks, bonds, equities)
MIT License
6 stars 2 forks source link

VQ "Stop Out" Detection #109

Closed nga-27 closed 4 years ago

nga-27 commented 4 years ago

After the market's recent COVID-19 volatility, some equities stopped out. However, the volatile rebounds have had closes above the VQ stop loss line, leading to an incorrect discrepancy between the API-queried result and the actual state.

(e.g. VGT stopped out at $233, but has closed at $248 on 3/4. This program shows VGT in a "Caution: Hold" state when it technically stopped out. Checking out the actual website shows that it indeed stopped out.)

The website portal has a means for checking this but not the API. Some options include selenium (to click to add a "fake@gmail.com" email) and beautiful soup to scrub the page for insights.

Not an easy challenge.

nga-27 commented 4 years ago

Another option could be like the following:

while (close < nearest_max):
    if low < vq_stop_loss:
        has_stopped_out = True
    update --> close, low

if has_stopped_out:
   # update vq printout
nga-27 commented 4 years ago

Fixed above with if close < vq_stop_loss:

Updated with 0.1.27

nga-27 commented 4 years ago

completed with #111