fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Practical Constraints

5 algorithms in Portfolio Construction.

In this family#

  1. Turnover-Constrained Optimization contract

    solveTurnoverConstrainedMarkowitz(mu, covariance, lambdaRisk, w0, tau, options)
  2. Transaction-Cost-Aware Optimization contract

    optimizeTransactionCostAware(mu, covariance, lambdaRisk, x0, buyCost, sellCost, options)
  3. Cardinality-Constrained Portfolio contract

    optimizeCardinalityConstrained(mu, covariance, lambdaRisk, current, K, options)
  4. Long/Short Gross-Net Constraints contract

    Computes long, short, net, and gross exposure from signed weights, checks a net interval and gross cap, and solves the mean-variance problem under both.

    optimizeGrossNetConstrained(mu, covariance, lambdaRisk, netMin, netMax, grossMax, options)
  5. Tax-Aware Portfolio Optimization contract

    Scores which lots a fixed-size sale draws on, and separately solves the exact trade balancing return, tracking risk, cost and a declared illustrative lot score.

    optimizeTaxAwareTrade(holdingsInit, benchmark, expectedReturn, riskMatrix, prices, lots, tradeDate, options)

What they share#

Every topic here is a record-transform, so once you have called one the rest follow the same shape. Import paths differ only in the final segment:

ts
import { solveTurnoverConstrainedMarkowitz } from "fintech-algorithms/portfolio-construction/practical-constraints/turnover-constrained-optimization";
import { optimizeTransactionCostAware } from "fintech-algorithms/portfolio-construction/practical-constraints/transaction-cost-aware-optimization";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Portfolio Construction collects 20 algorithms across 4 families. For the concept behind this family rather than the call signatures, see the concept guides.