Automated Trading Accelerator Program › Forums › Python for Financial Analysis › Support Session Recordings and Code › Reply To: Support Session Recordings and Code
March 5, 2020 at 4:11 pm
#5605
Keymaster
::
Code snippets:
1. Rank investigation
cols = ['High','Low','Close', 'PriceRange']
df.loc[:,'PriceRange'] = (df.High - df.Low) / df.Close.shift(1)
df.loc[:,'PRangeRank'] = df.PriceRange.rank(pct=True)
xdf = df[df.PRangeRank > 0.98]
2. Libraries needed for connecting to Google Sheets
#import gspreads as gs
#from oauth2client.service_account import SerivceAccountCredentials