Building your team's fund

Each of you has finished a strategy. Now you put them together into one fund and see how the combination did. This guide assumes you have not done that before and explains every word as it comes up.

What a fund is here

A fund is a portfolio of portfolios. Each teammate's strategy becomes one holding, and you decide how much of the money goes to each.

In the design app you built a rule for picking shares. This page does not do that. It starts from the finished strategy.json files your team already exported and asks a different question: given these four or five designs, how should the team split its money between them, and how would the combination have done?

Component One teammate's finished strategy, acting as a single holding inside the fund. If your team has four members, the fund has four components.
Weight The share of the fund's money that goes to one component, written as a decimal. A weight of 0.25 means a quarter of the money follows that person's rule. The weights add up to 1, because all of the money goes somewhere.

This page cannot create or change a design. That is not a rule it enforces: the design form is not in this file at all. If you need to change a strategy, go back to the main The backtesting app page, change it there, and export it again.

The words you need

Strategy id A short label like team-01-a3f91c4d that names one design. It is printed next to the export buttons in the design app and stamped inside the file. Two exports of the same unchanged design get the same id, and any change to the design gives a different one. The fund uses it to say exactly which file carries which weight.
Data pack A zip file your instructor posted, holding the price history everyone works from, and saying which stretch of time it is for. This term has three: the design pack you have had since the start, and the two test packs released after the design freeze. Beside each zip is a page, README.html, that says what the pack covers and which companies it does not carry. Read it before you load the pack.
Window A stretch of trading days the fund is measured over, with a start date and an end date. Your course has a design window and two test windows, one per pack. Each window lives in exactly one pack, and a window is only ever run on the pack it came from.
2022 2023 2024 2025 2026 Design123 trading days Test 163 trading days Test 264 trading days grey: warm-up history carried by that pack
The three windows the fund is measured over. The test windows are earlier in the calendar than the design window; a test is history the designs were not tuned on, whichever side of the design window it falls.
Sharpe ratio Return per unit of risk. It takes what the fund earned above the safe rate and divides it by how much the fund bounced around. Higher is better. Two funds that made the same money are not equally good if one of them lurched to get there.
Composite One Sharpe ratio for the whole fund across all the windows, rather than one per window. Each window counts in proportion to how many trading days it has, so a two-week window does not count the same as a year. This term the design window has 123 trading days and the two test windows 63 and 64, so the design window carries about half of the composite and each test window about a quarter.
Covariance A measure of whether two things move together. Two strategies that rise and fall on the same days have high covariance; two that take turns have low covariance. It matters because two holdings that move together give you less protection than two that do not, even if each looks good on its own.
Move together: high covariance the fund (dashed) is just as bumpy as either one Take turns: low covariance the fund (dashed) is far calmer than either one
Two teammates' strategies, blue and brown, and the fund that holds half of each, dashed. On the left they lurch on the same days and the fund lurches with them. On the right one zigs when the other zags, and the fund barely moves. Same two Sharpe ratios going in; very different fund coming out. That is what covariance measures and what the minimum-variance method hunts for.
Equal allocation Every component gets the same weight. With four components that is 0.25 each. This is the comparison every other choice is measured against, and it is always on screen.

What to have ready

You needWhere it comes from
One strategy.json per teammate Each person exports their own from the design app. They must be the frozen versions you handed in, not later edits.
The term's three packs: design, test 1 and test 2 The same design zip you used for your own backtests, plus the two test zips released after the freeze. Each has a README.html beside it; the app's pack table shows the same dates and trading-day counts once they load.
Your team name, written the same way by everyone It is inside each strategy.json. If two people typed it differently the files still work together, because the id treats "Team 01" and "team-01" as the same team.
Export again if you are not sure Re-exporting a design you have not changed gives you back a file with the same strategy id. So if anyone is unsure whether their file is current, exporting it again costs nothing and settles the question.

Step by step

  1. Drop in your packs and your designs

    Drag everything onto the box at the top: the pack zips and every teammate's strategy.json. You can do it in any order and in any number of goes.

    As each pack loads, the panel below lists the window it carries. This term each pack carries one window, so three packs give the three windows your fund is measured over. Drop all three together: the page refuses two packs that claim the same window, and it says so under the table rather than quietly picking one.

    Three packs take a few seconds to load and a few hundred megabytes of memory, because the app keeps every price in memory to run the backtests quickly. On an older laptop, close other heavy tabs first.

  2. Check the list of designs

    Every accepted design shows its strategy id, the analyst, the team and the design name. Read that table out loud against what your team expects. This is the moment to catch a file that is one version out of date.

    A file can be refused, and the message says why. See if something is refused at the bottom of this page.

  3. Choose how the weights are set

    Four options, described in the next section. Start with equal allocation and look at the numbers, because that is what everything else gets compared to.

  4. If you picked an optimiser, choose what it fits to

    Minimum variance and maximum Sharpe both need a stretch of history to work from. You tick which windows. This is your decision, it is recorded in what you hand in, and there is a whole section on it below.

  5. Build the fund

    Press the button. Each design runs over each window, on the pack that window came from. With ten designs and three windows that is thirty backtests, so give it a moment. The bar at the top says what it is doing.

  6. Read, adjust, rebuild

    Change the method or the weights and build again. The backtests are kept, so a second build with different weights is quick. If you change the designs or the packs, everything runs again.

  7. Export

    fund.json is what you hand in. The spreadsheet is for you, and for the part of the report where you explain what the fund did.

The four ways to set weights

MethodWhat it doesWhat it needs from you
Equal Every component the same weight. Nothing. It is arithmetic.
Manual You type each weight yourself. A reason for each number, which the interview will ask for.
Minimum variance The weights that would have given the steadiest fund. It uses covariance, so it leans towards components that move differently from each other. Which windows to fit to.
Maximum Sharpe The weights that would have given the best return per unit of risk over the window you fit to. Which windows to fit to.

The limits every method obeys

Whatever you pick, each weight has to be between 0.05 and 0.40, and the weights have to add up to 1. Those numbers come from your course settings, not from this page.

The floor stops a component being in the fund in name only. The ceiling stops one person's design becoming the whole fund, which would make it a single strategy wearing a team's name. A consequence worth knowing: a team of two cannot satisfy a ceiling of 0.40, because two weights of at most 0.40 cannot reach 1.

The optimisers work inside the limits, not around them There is a shortcut some tools take: solve the problem ignoring the limits, then trim anything that ended up too big and share out what is left. That gives a different portfolio from the real answer, and sometimes one that still breaks the limits. This page solves the constrained problem directly, so the weights you get are weights the method actually produced.

Why the weights are reproducible

The optimisers use no randomness and no clock. Running the same fit twice gives identical weights, on any computer, and the settings used are written into your fund.json so your instructor can reproduce them from the file alone.

Choosing what to fit the weights to

An optimiser has to look at some history to work out its weights. You choose which history. By the time you build the fund you hold every pack, so all the windows are available to you.

Estimation window The stretch of history the optimiser looks at when it works out the weights. It is not the same as the window the fund is measured over, and it does not have to match.

Look at which boxes are ticked before you build, because the choice is yours and it is written into what you hand in. You may tick any of the three windows, including the two test windows your fund is graded on. Remember that this term's test windows sit before the design window on the calendar, so "fit to the test windows" means fitting to 2023 and 2025, history none of the designs were tuned on but history your fund will be marked on all the same.

What happens if you fit to the windows you are graded on Your fund will look better on those windows. Some of that improvement is a real allocation decision, and some of it is the optimiser having been shown the answer first. The two are hard to tell apart from the number alone, which is exactly the lesson. Your instructor sees which windows you chose, because the file records them, and the interview is where you explain whether your weights would have survived a stretch of history you had not seen.
Overfitting Tuning a decision so closely to one stretch of history that it describes that stretch rather than anything general. It shows up as a result that looks excellent on the data it was fitted to and ordinary everywhere else.

A useful thing to do, and a good paragraph for your report: fit the weights to the design window alone, write down the numbers, then fit them to everything and compare. If the two sets of weights are close, your allocation is saying something stable. If they are far apart, that is worth understanding before you defend it.

How the fund is measured

Two halves, and only one of them responds to anything you do here.

HalfWhat it measuresCan your weights move it?
Equal allocation performance The quality of the underlying designs. Every component at the same weight, across every graded window. No. Equal weights are fixed by arithmetic. Your instructor rebuilds this from the list of components, which is why you do not hand in an equal-weight fund.
Improvement over equal Your allocation, minus that baseline. Yes. That is the point of it.

This is why the equal-allocation figure sits on screen the whole time you are choosing weights. You can see what you are being compared against while you decide, rather than finding out afterwards.

The improvement figure is a plain subtraction and it is not floored at zero. A team whose allocation did worse than equal weights sees a negative number, which is information rather than a punishment: it usually means the components move together more than the team expected.

Reading the numbers on screen

The two tiles at the top

Left is the equal-allocation composite, right is yours. The note under the right tile gives the difference. Both are Sharpe ratios across all the graded windows.

The window-by-window table

One row per window, with its trading days, how much it counts towards the composite, and both Sharpe ratios. Windows are weighted by length, so the longest window carries the most.

Design: 123 days, 49% Test 1: 63, 25% Test 2: 64, 26% composite = 0.49 x Sharpe(design) + 0.25 x Sharpe(test 1) + 0.26 x Sharpe(test 2) the weights are the trading days of each window divided by the total, 250
Length weighting for this term's three windows. Your instructor may choose another weighting at grading time; whichever is used is written next to the number.

Two messages worth understanding

"produced no Sharpe ratio that could be combined" A Sharpe ratio needs the fund to have moved at all over the window. A fund that went to zero early sits flat for the rest of it, and a flat series has no Sharpe ratio. That window then counts for nothing and the others are shared out again. The message names the window so you can go and look at it, rather than the composite quietly changing meaning.
"combined over different sets of windows" This means the equal-allocation figure and yours were built from different windows, because one of them produced a figure on a window where the other did not. Subtracting them would compare two different things, so the improvement is not shown at all. Fix the window that produced nothing before you read anything into the comparison.

Checking it in Excel

The spreadsheet is there so you can check the arithmetic yourself, in a tool you already know.

SheetWhat is on it
Fund summaryThe composite figures, the per-window rows, and the weights.
Fund dailyOne row per trading day: the fund's value under your weights and under equal weights.
Fund holdingsOne row per component per day: units held, value per unit, value, share of the fund.
Contribution, one per windowEach component's weight, its return over the window, and the two multiplied.

Two checks you can run, and both should come out exactly:

  1. On the holdings sheet, units times value per unit equals the value column, on every row.
  2. Filter the holdings sheet to one date, add up the value column, and you get that date's fund value from the daily sheet.
Value per unit What one unit of that component was worth, starting at 1.00 on the first day of the window. It is the same series that component's own spreadsheet shows as the growth of $100, so put the two side by side and they agree once you divide by 100.

The contribution sheets add up to roughly the fund's return over the window rather than exactly. That is not an error: the fund rebalances back to your weights at intervals and the weights drift in between, which the holdings sheet shows day by day.

What to hand in

fund.json Your team's submission. One per team, not one per person. It names your team, each component by strategy id with its analyst and weight, which method produced the weights, and which windows the weights were fitted to.

It also records a fingerprint of each strategy file, so it is tied to the exact designs you handed in. If someone edits their strategy after you build the fund, your instructor sees that the fund was built against a different copy, and it is a named finding rather than something anyone has to go looking for.

You cannot export an equal-weight fund, and that is deliberate There is nothing to submit: your instructor rebuilds it from your list of components. It is the half of the mark no allocation decision can move, so it is not yours to hand in. Pick one of the other three methods for the file you submit.

Scenario mode, the tickbox above the design list, lets you combine designs from more than one team so you can explore. The figures and the spreadsheet still work; the fund.json export switches off, because a submission names one team.

If something is refused

What you seeWhat it means and what to do
"carries no strategy id" The file was exported before ids existed, or was hand-edited. Open the design in the main page of the app and export it again. The design does not change and the id it gets is the design's own.
"was changed after it was exported" The id inside the file no longer matches what is in the file, so the file was edited by hand after export. Export it again from the app rather than repairing it in a text editor.
"the same design twice" Two files carry the same strategy id, so they are the same design. Someone probably sent their file twice, or two people exported the same work. One weight goes to one design.
"a submitted fund names one team" One of the files names a different team. Check that everyone typed the team the same way, or turn on scenario mode if you are exploring on purpose.
"Both ... and ... carry the design window", naming two of your packs You have loaded two packs that both claim the same window. Because they were built at different times they disagree slightly about shared history, so there is no correct way to pick between them. Remove the one that window was not released on.
"the covariance matrix ... is singular" Two components have return series the optimiser cannot tell apart, or one of them does not move at all. Look at the per-window figures for two components that behave identically. Equal or manual weights still work.
"the estimation window is N trading days long" You are asking the optimiser to fit more components than you have given it days of history. Tick more windows, or use fewer components.
"outside the allowed band" A manual weight is below 0.05 or above 0.40. The message names the component by its strategy id, which you can read off the design list above.

Everything on this page runs on your own computer. Nothing is uploaded, there is no account, and closing the tab loses nothing you have exported.