Back to Community
Japan tearsheet challenge

The third tearsheet challenge is here and this time we're going international -- all the way to Japan! Because of various technical reasons this challenge will be a bit different. The main difference is that global equities are currently only supported in pipeline, not the backtester. As such, you will have to code your factor in pipeline in the notebook. This creates the challenge that for your submission your code would be in the notebook you post. The solution is to delete the code cell with your factor and save the notebook before you submit.

This challenge is a bit more experimental for us. We mainly want to scope out how much alpha we are likely to find in Japan and whether it makes sense for us to start trading there. In addition, we want to motivate you to work with non-US market data. As we currently do not trade the Japanese market, we will not license any factors submitted here in the short-term.

There is also a questionnaire for all entrants that we would appreciate if you filled it out, but you do not have to.

Here are the rules:

  • There is no submission or live-updated leaderboard like for the contest.
  • To enter this challenge, simply post an alpha tearsheet as a reply to this thread. Clone the attached template and add your own pipeline factor code.
  • The deadline to submit a factor is November 15, 2019. There is no hold-out testing, just post your best factor starting on June 1, 2015, until Oct 1, 2018. We will look at all tearsheet submissions and manually determine 5 best factors according to our discretion. Each winner gets a $100 prize. There is no limit on the number of submissions.

Algorithm requirements to enter the challenge:

  • Your factor must be run on the Japanese equities domain. It can however, use any dataset(s) you want.
  • Use the universe provided by the template, or a subset of it.

When selecting a winner, we will primarily look at:

  • Total Sharpe Ratio (IR) over the first 5 days in the alpha decay analysis (higher is better). As the risk model is US-only, there is no specific return or risk exposure analysis.
  • Turnover (lower is better).
  • Universe size (larger is better).
  • For more examples on what we look for, check out our last live tearsheet review.

Good luck and happy coding!

Loading notebook preview...
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.

64 responses

My first submission - based on factor combination.

Click to load notebook preview

My second submission - Again based on factor combination.

Click to load notebook preview

Revised Model 01

Click to load notebook preview

Model 0.1

Click to load notebook preview

Know it's not what you're looking for turnover wise, but it can't hurt. EDIT: What's with all the cloning? As far as I'm aware no data can be extracted?

Click to load notebook preview

Model 1

Click to load notebook preview

Model 0.1 - Still WIP.

Click to load notebook preview

First attempt at absurdly high turnover (the Notebook ran into memory issues, so I split the simulation, one from 2015-2016 and one 2016-2018).

Click to load notebook preview

Dear Thomas and all,

I noticed that getting results for simulation is not fast and memory expensive here and worked on this problem. Wanted to share my thoughts with community.

There is some 'bad moment' for time and memory during merged_returns DataFrame creation in evaluate_factor() func. It comes from the fact that we simulating returns' pipeline without screen, on all instruments, so we need to 1) filter every of forward returns columns (with factor_result.index) or 2) concat too big pandas dfs (if creating dfs without any factor's index filtering, which is even more costly).
It's done to get forward returns - because if we simply screen on univ_filter, we will get some unexpected NaNs, our filter is changing every day. Here are 2 workarounds:
1. We can "extend" filter for 15 days with simple custom function. I attached some code, there should be one change in evaluate_factor() also. By such screening we reduce returns pipeline size on creation stage.
2. Even more simple and faster - we can store merged_returns DataFrame as global variable.
You can take this code part from evaluate_factor() func and not filter it by factor's index (delete index =... during DataFrame creation). And then use this global variable filtering it by factor's index in evaluate_factor() every time. But this, of course, not improving memory problem.

If I missed something you're welcome.

Click to load notebook preview

Attempt 2

Click to load notebook preview

Model 0.2 - Possibly final.

Click to load notebook preview

First Attempt

Click to load notebook preview

Smoothed. I'll call this my final model 1.0 (for now at least). :)

Click to load notebook preview

Model 02

Click to load notebook preview

My first attempt - Only changing factset.Fundamentals data fields.

Click to load notebook preview

@Oleg - Thank you for the improvement to evaluate_factor! Your solution makes it run faster and use less memory so I updated the notebook in the original post to use your suggested change. Note that I made some small tweaks, changing filter_extend to FilterExtend and changing the window_length to max(returns_lengths)+1, so that it's parametric on the returns_length argument.

Great find!

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.

Model #1

Click to load notebook preview

initial attempt

Click to load notebook preview

Submisson #1. Fundamentals only. Quantiles show a skew towards naturally favoring long positions.

Definitely a lot of progress to be made!

Click to load notebook preview

Version A.

Click to load notebook preview

Version B.

Click to load notebook preview

How do we get sector and industry classification for global equities?

@Viridian, use the RBICS Focus data.

Edit: Scroll down for v2.1 that replaces this.

Submission #2. Added some estimates factors to my fundamentals (submission #1). Again, quantiles suggest a natural favoring towards long positions.

Click to load notebook preview

Fundy Combo - Sub1

Click to load notebook preview

@Jamie, oh, of course, it's better to make window_length parametric, my bad, thank you.
Glad to help :)

second attempt

Click to load notebook preview

last

Click to load notebook preview

Edit: Submission 2.2 is below. Check that out instead.

Submission #2.1 (replaces my submission 2 above). Added one more factor for smoothing.

Click to load notebook preview

Edit: Scroll down for submission v3.1. It has this factor and two others. Again, my tests show that it is fairly robust over time.

Submission #3. One single factor that my tests showed to be fairly robust over time. Not sure how to best integrate it with other Japan factors, but I thought I'd include it here because of the strong short-term signal I was seeing.

Click to load notebook preview

First submission

Click to load notebook preview

Updated version 1 with larger universe

Click to load notebook preview

RBICS economy neutral algorithm

Click to load notebook preview

A combined factor

Click to load notebook preview

Edit: I have a v2.3 below. Sorry for whoever keeps having to scroll down!

Submission #2.2. Replaces v2 and v2.1.

Click to load notebook preview

Model 03

Click to load notebook preview

Another RBICS economy neutral algorithm

Click to load notebook preview

Three factors

Click to load notebook preview

My second attempt - Using two factset.Fundamentals data fields.

Click to load notebook preview

Model #2

Click to load notebook preview

My first submission

Click to load notebook preview

My 3rd attempt - learning by watching documents.

Click to load notebook preview

Adding in the ML from https://www.quantopian.com/posts/a-machine-learning-template-for-japan-tearsheet-challenge

Click to load notebook preview

v1

Click to load notebook preview

My 4th attempt - Slightly improved

Click to load notebook preview

My second submission

Click to load notebook preview

@Shogo: Those look great, I would investigate what's going on before Oct 2016 where there seems to be a shift in the number of positions as well as the weight distribution (the two lower plots).

Model 04 - Higher Total SR (first 5 - 10.10) with higher turnover rate

Click to load notebook preview

Submission #2.3 (Replaces all previous v2.x). Fundamentals and Estimates.

Click to load notebook preview

Submisson #3.1. Three estimates factors that my tests showed were fairly robust from 2012-present. Here's the tearsheet result for 1/1/12-10/1/18: link

Click to load notebook preview

first submission

Click to load notebook preview

Hi, I know other people have better IR, but I will try anyway.

Click to load notebook preview

Hello, version 2. Slightly improved.

Click to load notebook preview

Model #3

Click to load notebook preview

Model #4

Click to load notebook preview

My 5th attempt - Thank you for an interesting contest!

Click to load notebook preview

Thanks everyone for submitting, looks like some great stuff in here and especially excited to see so many new entrants (arigatou gozaimasu)! We will post the winner announcement details soon. If you're hungry for more, there is a new challenge already posted: https://www.quantopian.com/posts/financials-tearsheet-challenge

Also, if you haven't yet, please fill out the questionnaire we have posted: https://docs.google.com/forms/d/e/1FAIpQLSdZ2-aQkQgO_R6dIygxNcC_Yfs8WFDMjDFtKxtF060U-4RUHg/viewform?usp=sf_link It'll take less than 5 minutes and you can just skip questions you don't want to answer.

Hi everyone, thanks again for all the submissions. The Tearsheet Review & Winners Announcement webinar is happening this Wednesday, December 18th at 11AM EST. You can watch the video where it is embedded below, or at this link: http://bit.ly/japantsweb.

As announced in the webinar (thanks everyone for tuning in), here are the winners of the cash prizes:

Winners (in no particular order):
Oleg
Kuwa Wen
Kyle M
Joakim
Indigo Monkey

Newcomer prize:
Bala Sridar

Please join me in congratulating them for their outstanding contributions!

If anybody has any insight as to why so many of these strategies have the same drawdown, I'd be curious to know. The submission I was working on also had the same drawdown.

I'm also curious whether, since there was no "tradable universe" screen, isn't it possible (or altogether most likely) that the most significant alpha demonstrated in these tearsheets is derived from illiquid stocks whose frictional costs would be so high as to negate the apparent market inefficiency?

@Viridian, I have no idea on the drawdown, but that doesn’t stop me from speculating. ;)

I wonder if this was due to the Nikkei / Topix having a bit of a downturn around this time?

Regarding the ‘tradable universe’ they did have a quick proxy for this, right? Top 30% dollar (or yen) Volume the last 10 days I believe (from memory). Not as sophisticated as the QTU of course but good enough for this purpose, in my opinion anyway.

Oh ok, I glanced right over that. I wonder how many people used the univ_filter.

Thomas, I noticed that you never pay attention to the returns generated by the factor/algo in picking the winners. The top left graph in your tearsheet may be a proxy to that, but is it not true most people really care about the top right graph which you never talk about.

@Bala: Well just the cumulative returns don't tell you much about the risk-reward tradeoffs, so Sharpe Ratio is quicker that way. But that's not to say the right graph is not important.