Explain a price move by factor
explain_price_moveDecompose a day's simulated price move into 11 factor contributions to the mispricing, revealing which factors shifted prices; omit the ticker for largest moves.
Instructions
Break one day's move for each name into the 11 factor contributions that sum to the day's change in the mispricing, the log gap between the model price and fair value. Use it to ask which factors moved prices; use explain to trace one name's move down to the random draws behind it. They are the simulator's own bookkeeping, and they are not the whole price move. On the default preset most of the day's news and noise moves fair value, fair_value_shift takes that part out of the mispricing, and the fair-value move itself is not split up. Without a ticker it returns the top_n largest moves. Builds and runs its own market for up to 60 days; read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | The trading day to explain, 1 to 60. | |
| seed | No | Simulation seed, an integer from 0 to 2**64 - 1. The same seed and arguments give the same result. | |
| top_n | No | How many instruments to return, largest moves first, when no ticker is given. 1 or more. | |
| ticker | No | One ticker from the roster. Omit to take the largest moves (explain_price_move) or the first name (explain). | |
| universe | No | A roster document, usually the `universe` field of a build_universe result. Either {"size": n, "seed": s, "sectors": [...]} or {"instruments": [...]}. When given it replaces universe_size, universe_seed and universe_sectors. | |
| universe_seed | No | Seed that generates the roster, separate from the simulation seed. Ignored when `universe` is given. | |
| universe_size | No | Names in a generated roster, 2 to 120. Ignored when `universe` is given. | |
| universe_sectors | No | Lowercase sector ids to concentrate a generated roster on, for example ["technology", "energy"]. The ids: technology, financial_services, healthcare, energy, consumer_discretionary, consumer_staples, industrials, materials, real_estate, utilities, telecommunications, transportation. A concentrated roster is a named envelope gap, and the result says so. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||