1. RIA selects two models with weights An RIA picks two (or more) base templates from the firm's library and assigns percentage weights that must sum to 100%.
2. Investment engine creates the blended model
blend.py → resolve_holdings() recursively scales each template's ticker weights by its percentage, merges overlapping tickers by summing, and normalises the result to exactly 100%.
3. RIA accepts or denies the model The RIA reviews the effective holdings breakdown. On accept, the blended template is saved to the shared registry. On deny, the draft is discarded.
4. Nested blending Any saved blended template (e.g. Model C) can itself be used as a component in a new blend alongside other templates, creating arbitrarily deep composites.
5. Sharing across RIAs All accepted templates live in a firm-wide model registry visible to every RIA. Templates created by a peer are read-only; only the author or a firm admin can modify or delete them. A template cannot be deleted while another blend depends on it.
pip3 install flask
python3 app.py
# open http://localhost:5000data.py — in-memory registry + seed templates (from Live Models.csv)
blend.py — resolve_holdings(), create_blend()
app.py — Flask API