Quant Challenge

The challenge here is to find a portfolio investing strategy form data that performs admirably in out of sample data.
Please email solutions to data-science-challenge (AT) tworoads (dot) co (dot) in with code used to find the solution.

Leaderboard (Deadline to qualify for the prizes: Jan 3rd 2015)
Name Annualized Returns Affiliation
SJM 4.91% Cornell
deedee 4.10% IITK
jerry 3.98% IITK
Quant_AB 3.35% IITG
HumbleDebugger 3.22% UPenn
efficient_frontier 2.07% IITK
Prevolution 1.60% IITK


Motivation :
We have tried to preserve the essential elements of quantitative portfolio construction in this challenge, which are clean reliable data, using past data to trade in future and the final humbling fact that data that you will encounter upon running the strategy will be fundamentally out of sample and will not have been seen in any way by the strategy developer while constructing the strategy. We request the user to stay within the set of strategies that have a constant relative allocation between products, and have a fixed risk management mandate.


Input :
You are provided with a file with dates and returns for a number of securities on those dates.  The names of the columns have been set to arbitrary values and the data may or may not correspond to any actual products in financial markets. Out of all the data, certain contiguous parts of it have been taken out for the training set and provided to you here. The remaining data has been kept aside for test and the evaluation will be purely made on the test data.


Submission Requirements :
Your goal is to provide a set of weights, one for each product with the understanding that an investor using the strategy will invest that part of his portfolio in the product on each day.
Since this is after all a challenge, we will expect you to provide code, and instructions that can help us get to the same weights from the data.
The format of the output file with weights should be one weight per line.


Scoring :
On the test data, we will run a strategy that starts with a certain amount of money, and based on the weights you assign, each day for each product it allocates the specified fraction of the portfolio to that product. If at any point the portfolio drops to a value 15% lower than it’s previous peak, we will sell all holdings and move to cash for the rest of the data. We assume daily rebalancing to specified weights. Thus the transaction fees would accrue on the basis of the amount of rebalancing.
The scoring will be purely on the net profit accrued on test-data, however there will be extra points for risk-adjusted return.
A sample python file to score a submission

FAQ :
Q: Are there any transaction fees in this framework ?
A: Yes, we assume that 0.009% of all portfolio changes will be charged in fees. So for instance on a certain day if the notional value of the total trading done is $1000,000, we will assume $90 will be the transaction cost accrued. In practice we expect the transaction costs to be higher. We assume daily rebalancing. For instance to stick to the specified weights if we need to transact to an amount equal to 2% of the portfolio on a day, the net transaction costs would be 2% * 0.009% for that day.

Q: Which programming languages are allowed for this ?
A: You can use anything that is freely available and all packages that are freely and easily available. ( If you ask us, we’d probably work in Python, R, Julia, Octave )

Q: Is there any risk management in place?
A: We assume that if at any point the portfolio finds itself 15% lower than its previous peak, then we will sell all holdings and move to cash. In other words, we will be locking the loss if we ever have a 15% drawdown.

Q: Do the weights need to add up to 1.00 ?
A: No they do not! The sum of absolute value of the weights can be at most 5.00. In the event that the sum of weights is greater than 1.00, the investor will need to employ leverage to implement the strategy. In most markets a leverage of upto 5.00 is not very costly.

Q: Are negative weights allowed ?
A: Yes, negative weights are totally permissible. We do expect the sum of weights to be a positive number, just because most of the input series have an overall positive trend. Negative weights in the context of portfolio management generally imply a position on a relative product. For instance { -0.5 B, +1 A } can be seen as { 0.5 A, 0.5 ( A – B ) }. In practice, to implement a negative weight, we would short-sell the product with the negative weight.

Q: What is the format of the output weight file ?
A: We expect one weight per line, and the number of weights should be equal to the number of products we have returns for.

Q: What is the rebalancing frequency ?
A: We assume daily rebalancing.

Q: Why don’t we have the flexibility to change weights ?
A: The weights here are meant to be an allocation strategy. In that context it is perhaps too strong a claim that prudent portfolio management should be restricted to having the same allocation at all times. Hence non-constant weights can certainly be a good idea. However it is perhaps easy to claim that most of real money-managers, from individuals to institutions, make only very small changes from their target allocation. Hence the competition challenges one to figure out a better allocation strategy. The general form of portfolio management where weights are flexible will perhaps be too wide a field to have a single competition on.

Q: Can I submit more than one entry ?
A: A participant is allowed to enter at most two solutions. We will post the best of two solutions.