I'm simply trying to determine if it was a down-day or up-day using an IF statement and I'm getting the error
"ValueError: The truth value of an array is ambiguous. Use a.empty, a.any() or a.all()."
I understand this is because pandas is mad at me for trying to convert something to a bool but I'm too inexperienced to figure out how to fix it.
Would someone mind helping me?
spy_daily = get_pricing(
'SPY',
start_date='2017-01-01',
end_date = '2018-05-11',
frequency='daily',
)
if spy_daily.open_price < spy_daily.close_price:
{my operation}
else:
{another operation}