hey guys,
i need your help. i want to show the daily returns of the SPY in 2 graphs. the first should only show the positive returns with time on the x axis. the other one only the negative ones also with time on the x axis.
i want the graph to show only data in the timeframe from market opening till 12AM.
thanks for your help.
here some extract of my code: (i know there are some problems with my syntax)
pct_change = data['SPY'].pct_change() #need a number for pct_change
def markettype(pct_change):
for num in pct_change:
if pct_change >= 0:
print pct_change #here should be the plotting command
elif pct_change < 0:
print pct_change #here should be the plotting command