Changelog
All notable changes to this project should be documented in this file.
The format is based on Keep a Changelog, and this project follows versioned releases.
[Unreleased]
Changed
- Added
MSDataInterface.get_latest_discount_curve(...)for explicit latest discount-curve lookup by curve identity without using the globalUSE_LAST_OBSERVATION_MS_INSTRUMENTfallback. - Refactored the
migrations:migrationprovider, Alembic environment, model registry, and dynamic portfolio example provider onto the SDK-owned MetaTable migration helpers, with revision directories treated as generated Alembic output rather than pre-existing documentation state. - Renamed account allocation APIs and schemas around their actual domain:
AccountModelPortfoliobecameAccountAllocationModel,AccountTargetPortfoliobecameAccountTargetAllocation, and the related fields now useaccount_allocation_model_uidandaccount_target_allocation_uid. - Moved
PortfolioTableidentity and account target-position storage into coremsm;msm_portfoliosnow owns portfolio calculation workflows, while coremsmowns virtual-fund identity, virtual-fund holdings storage, and account allocation planning. - Added the account holdings to virtual-fund allocation planner with
proportional_attributionandstrict_feasiblepolicies, plus an apply step that converts feasible plans intoVirtualFundHoldingsStorageframes. - Extended the account virtual-fund planner with deterministic
position_set_uidinput resolution, notional target conversion through the valuation resolver, deterministic virtual-fund identity helpers, and resolver-level tests plus a dry-run-first account virtual-fund allocation example. - Moved virtual-fund knowledge documentation under the Accounts section as a standalone account allocation document.
- Reorganized DataNode storage contracts by concept: account storage now lives
under
msm.data_nodes.accounts, asset storage undermsm.data_nodes.assets, execution storage undermsm.data_nodes.execution, and portfolio/pricing storage under their matching concept packages. - Renamed the one-pass account and portfolio example to
examples/msm/accounts/account_portfolio_full_workflow.pyand moved the PyCharm run configuration under Accounts because the workflow prepares the reusable portfolio sleeve and then publishes account target positions and holdings. The same full workflow now exposes the virtual-fund allocation extension through dry-run and apply flags. - Added the
apps/v1target-allocation candidate search endpoint for account target-position assignment, returning one paginated asset and portfolio candidate list backed by a compiled MetaTable read. - Added the
apps/v1account target-position write endpoint, deriving parent allocation rows from the account uid and replacing target-position snapshots through one scoped MetaTable upsert operation. - Tightened account target-position validation so portfolio target rows cannot
use
single_asset_quantity. - Added the
apps/v1pricing curve registry list endpoint backed bymsm_pricing.api.Curveand the shared limit-offset pagination envelope. - Promoted virtual-fund allocation strategy to the first-class
VirtualFundHoldingsStorage.allocation_strategycolumn; low-level explicit publications writeexplicit, and planner-applied rows write the allocation policy mode. - Refactored portfolio construction to consume an explicit
price_source_instanceinstead of havingPortfoliosDataNodeconstructInterpolatedPricesfrom portfolioAssetsConfiguration/PricesConfiguration, and updated the equal-weight portfolio example to show the explicit source prices -> interpolation -> signal -> portfolio dependency graph. - Replaced deprecated builder terminology with portfolio construction wording across README, portfolio docs, ADRs, and internal portfolio logger helper names.
Fixed
- Clarified that
AssetCurrentPricingDetailsTableand the timestampedAssetPricingDetailDataNode are independent storage paths, not views or automatic mirrors of each other. - Clarified account and portfolio example console output with section titles, corrected portfolio workflow step numbering, and cleaner virtual-fund allocation frame rendering.
- Fixed account virtual-fund planning for portfolio targets so portfolio
sleeves expand from the latest
PortfolioWeightsStoragesnapshot at or before valuation time instead of requiring exact timestamp equality. - Normalized
InterpolatedPrices.update()output time indexes and timestamp columns back todatetime64[ns, UTC]so backend-read microsecond timestamps do not fail SDK DataNode update validation. - Fixed the equal-weight portfolio schema-preparation workflow so it derives the
dynamic revision from the active migration namespace and runs the dynamic
provider upgrade before
--run-after, even when a stale metadata row already exists for the configured interpolation table. - Fixed
PortfoliosDataNodeforced reruns when the latest stored portfolio value is already ahead of usable price-source coverage; the portfolio update now returns no new rows before calling calendar scheduling with a reversed date range. - Fixed
ImmediateSignalso portfolio price sources only need the configured price column; missingvolumenow produces nullable portfolio-weight volume fields instead of failing the rebalance calculation.
Removed
- Removed the internal markets MetaTable catalog table, generic
/api/v1/catalogroutes, catalog service layer, and migration catalog refresh hooks. Runtime attachment now stays on direct backendMetaTable/TimeIndexMetaTablelookup by SQLAlchemy table name.
[0.0.39] - 2026-06-06
Highlights
- Split the library into clear package boundaries:
msmfor core market data,msm_portfoliosfor portfolio and virtual-fund workflows, andmsm_pricingfor pricing instruments, pricing market data, curves, fixings, and QuantLib-backed engines. - Completed the storage-first DataNode architecture: DataNode outputs are now
backed by
PlatformTimeIndexMetaTablestorage classes, with schema, dtypes, index grain, metadata, and foreign keys owned by SQLAlchemy/SDK table contracts instead of DataNode-side mirrors. - Moved MetaTable schema lifecycle to the SDK-managed Alembic provider flow and made runtime startup attach to already-registered tables by physical table name rather than using the maintenance catalog as runtime control.
- Reworked portfolio examples into explicit schema-preparation and runtime stages so configured interpolation storage is registered before normal portfolio execution.
- Added cohesive account, asset, portfolio, and pricing documentation, examples, and packaged agent skills that reflect the current package boundaries.
Changed
- Reorganized examples under
examples/msm/,examples/msm_portfolios/, andexamples/msm_pricing/; reorganized knowledge docs under the same package boundaries. - Standardized asset extension naming: public API rows use domain names such as
Bond,Future, andCurrencySpot, while one-to-one MetaTables use<Domain>AssetDetailsTablewithasset_uidas the primary key and FK toAssetTable.uid. - Normalized asset-indexed storage identity columns to explicit names such as
asset_identifier,index_identifier,curve_identifier, andportfolio_identifier, while preserving unique MetaTable business keys such asAssetTable.unique_identifier. - Updated markets, portfolio, and pricing bootstraps to use
start_engine(...)as the public runtime attachment surface. - Replaced deprecated SDK foreign-key helper declarations with normal
SQLAlchemy
ForeignKey(...)declarations. - Added inline SQLAlchemy column labels and descriptions across built-in MetaTables and storage tables.
- Reworked accounts around
Account,AccountGroup,AccountAllocationModel,AccountTargetAllocation,PositionSet, and storage-backed holdings and target positions. - Reworked virtual funds as account-owned allocation views instead of synthetic asset rows.
- Reworked pricing market-data configuration around UID-backed market-data sets and bindings, plus index convention details, index fixings, and curve rows.
- Moved QuantLib pricing engine code under
msm_pricing.pricing_enginesomsm_pricing.modelsremains MetaTable-only. - Raised the Main Sequence SDK dependency floor to
mainsequence>=4.3.8.
Fixed
- Fixed runtime table attachment to resolve
MetaTableandTimeIndexMetaTableresources through POST body filters on physical table names. - Fixed configured
InterpolatedPricesstorage identity so schema preparation and runtime construction derive the same dynamic table from registered source storage hash, source cadence, upsample frequency, and interpolation rule. - Fixed stale source-cadence handling in the equal-weight portfolio schema-preparation workflow.
- Fixed string asset scopes in
InterpolatedPrices.update()so portfolio configurations using asset identifiers work consistently. - Fixed account holdings validation for signed quantity exposure through
quantity * direction. - Blocked
msm copy-msm-skills --path .from running inside the ms-markets source checkout.
Removed
- Removed legacy DataNode schema-bootstrap/fake-row APIs, DataNode-side dtype maps, record definitions, duplicate index-name constants, and compatibility shims that mirrored storage metadata.
- Removed the local
msm migrationscommand group and old migration runner in favor of the SDK Alembic provider flow. - Removed duplicated row-oriented execution fact MetaTables and APIs; execution facts are now storage-first.
- Removed obsolete asset reference-list, pricing, portfolio, account, execution, and utility shims that no longer match the current package boundaries.
- Removed core dependencies that now belong to optional extras, including
QuantLib under
pricingand FastAPI/Uvicorn underpublic_api.
[0.0.1] - 2026-05-25
Added
- Scaffolded the
ms-marketsPython project with the import packagemsm. - Added MkDocs documentation, ADRs, tutorial scaffold, and GitHub Pages deployment workflow.
- Migrated market-domain code from the SDK into
src/msm. - Migrated market-domain examples into
examples/. - Migrated market-domain agent skills into
.agents/skills/. - Added a future CLI package scaffold under
src/cli. - Added the initial
docs/knowledgeconcept documentation area formsmpackage concepts. - Added Apache-2.0 licensing metadata and the full project license.
- Added the
.agents/skills/library_maintenanceOpen Agent skill to enforce library maintenance workflows across implementation, documentation, examples, tutorials, changelog, and validation.
Changed
- Moved asset DataNode schemas from the obsolete
msm.assetspackage boundary intomsm.data_nodes.assets. - Moved OpenFIGI provider helpers into
msm.services.assets.openfigiand kept asset identity on themsm.models.assets.AssetMetaTable model. - Made
msm.servicesandmsm.data_nodespackage exports lazy so provider helpers and lightweight package imports do not initialize unrelated platform dependencies. - Reworked the README into the public project overview, including logo, badges, documentation map, quick start, development commands, metadata, and license information.
- Made README links PyPI-safe by pointing package-page readers to the public documentation site and GitHub project files.
- Added explicit source distribution include rules so PyPI source artifacts do not ship local IDE, workflow, or agent-maintenance files.
- Declared the first release version directly in
pyproject.tomlas0.0.1. - Refactored instrument valuation code into
msm_pricing. - Renamed pricing model helpers from the old
pricing_modelspackage tomsm_pricing.models.
Removed
- Removed migrated market-domain code, examples, and skills from the SDK tree.