A couple of minor bugs/requests in the /strategy API endpoint and live/simulated books

Hi p123,

I noticed a few minor issues with the /strategy API and with live and simulated books over the weekend.

  1. In the /strategy/id result, the keys returned under stats/perf/weekly/returns contain duplicate or mislabeled week names. For example, ‘Wk 1, 2018’ appears twice at the beginning and end of 2018, ‘Wk 1 2019’ appears at the end of 2019 after Wk 52, and the 2020 labels go from Wk 2 through Wk 53
Wk 52, 2017
Wk 1, 2018
Wk 2, 2018
...
Wk 52, 2018
Wk 1, 2018
Wk 2, 2019
...
Wk 52, 2019
Wk 1, 2019
Wk 2, 2020
...
Wk 52, 2020
Wk 53, 2020
Wk 1, 2021

Would it be possible to change these weekly labels to ISO date strings for either the first or last day of the week both fix these labels and to make the returned data easier to work with?

  1. The strategy name is not returned in the /strategy/id API data. Would it be possible to add it?

  2. It looks like Live Books use the first four non-whitespace characters of a sub-strategy as an abbreviated name that shows up in the “Notes” field to attribute each order to one or more strategies, e.g. “FFM Long 2.0” shows up as “FFML” as does “FFM Long 3.0”. Since this was causing colliding abbreviations for my use case, I renamed my strategies (to “FM2 Long”, “FM3 Long”, etc.), and created a completely new Live Book, and generated a new set of transactions. However, the Notes field still shows strategy abbreviations from the original names. I don’t expect existing transactions to update, but I would expect new transactions to use abbreviations that reflect current strategy names, e.g. “FM2L”, “FM3L”, etc. Can this be fixed?

  3. New Live Books default to a commission of 0.00005 USD per share, while new Live/Simulated Strategies to default a much more sensible commission of 0.005 USD per share.

  4. For Simulated Books, the “Minimum Rebalance Transaction” parameter does not show up under “Trading System”. I have to click “Re-run” in order to check that parameter value for an existing Simulated Book.

Thanks.

We have addressed issues 1 (using period start date), 2, and 5. As for issue #3, we use the first 4 characters (excluding spaces) of the model name to identify where the transactions originate from when rebalancing, you have taken the right steps towards disambiguation. We haven’t yet reached a conclusion about issue #4.

1 Like

Hi Marius,

Thanks so much for the quick fixes. I can confirm 1, 2, and 5 look good now.

Re: 3, by model name do you mean the strategy name or the ranking system name? It looks like strategy name to me, but I still don’t see new strategy names reflected in the abbreviations. Are the abbreviations created/cached at strategy creation time only? For example, I just created a new live book this morning, and the generated transactions do not reflect the current strategy (or ranking system) names: https://www.portfolio123.com/transact_list.jsp?portid=1704990. Still showing just FFML and FFMS.

live_book_transactions

Thanks!

Sorry, I meant strategy name, as you correctly deduced. Unfortunately, the 4 character abbreviation gets created when the book asset is created and does not get updated when the underlying strategy name changes. Copying a book does not trigger the change neither, the assets (and their names) are just copied from the original book. Only way to refresh the asset name is to delete it and add back I’m afraid.

Ah, thanks, that appears to work. I created a brand new book from scratch and see the updated abbreviations in the transactions.

Thanks.