Back to Community
Heatmap of Returns by Day of Week

Heatmap of SPY, IWM, TLT, and BND returns by day of week, 1/1/2015 - 4/15/2015. Looks like Thursdays have been good for equities and bad for Treasuries.

Loading notebook preview...
Notebook previews are currently unavailable.
9 responses

Very cool! This is a great visual of the returns

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

How much of that is due to Fed minutes releases on (some) Thursdays?

Hmm apparently that's Wednesday, what's that thing that comes out at 2pm on Thursdays ...

On Thursdays I don't know of a regular report at 2 pm, but the unemployment claims report is at 8:30 am ET, and it might explain some of the results.

I must be confused!

Hi, How do you run and view this Heatmap on Quantopian? Sorry I'm new and hence need a bit of guidance.

It's an iPython notebook that runs in the research environment. If you enter the contest, you can get early access.

Michael,

Very well done. So if I would like to calculate the odds on the price change. How you would do that?

Errors...


IndexError Traceback (most recent call last)
in ()
1 data = data_cached.copy(deep=True)
2 returns = data.pct_change()
----> 3 returns['weekday'] = np.vectorize(lambda x: x.weekday())(data.index.date)
4 returns.tail()

/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.pyc in call(self, *args, **kwargs) 1698 vargs.extend([kwargs[_n] for n in names])
1699
-> 1700 return self._vectorize_call(func=func, args=vargs)
1701
1702 def _get
ufunc_and_otypes(self, func, args):

/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.pyc in vectorize_call(self, func, args) 1761 _res = func()
1762 else:
-> 1763 ufunc, otypes = self.
get_ufunc_and_otypes(func=func, args=args)
1764
1765 # Convert args to object arrays first

/usr/local/lib/python2.7/dist-packages/numpy/lib/function_base.pyc in get_ufunc_and_otypes(self, func, args) 1722 # Assumes that ufunc first evaluates the 0th elements in the input
1723 # arrays (the input values are not checked to ensure this)
-> 1724 inputs = [asarray(
a).flat[0] for _a in args]
1725 outputs = func(*inputs)
1726

IndexError: index 0 is out of bounds for axis 0 with size 0