Do it professionally

Don’t get comfortable

 

 

 

Portfolio Optimization for 20 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

Portfolio Optimization for 20 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

Problem:
Construct the Optimal Portfolio that:
delivers the target return (mu_Target)
with minimum risk
Minimize the risk of the portfolio (in this case, measured as half the variance)
While maintaining an expected return target of (mu_Target)
By adjusting the investment weights on each asset
Subject to the budget constraint that the weights sum to 1
Method:
Since constraints are equalities => We can use Method Lagrange
Supports up to 20 securities.
Able to do more if requested. Please contact us.

Constraints:
No short-selling (ie. No negative weights)

Solution 00:
Basic MPT with only budget constraint that weights sum to 1
Solution 01:
Tweaked solution where no negative weights are allowed,
but budget contraint fails, as sum of weights exceed 1.
Solution 02:
Maintain that no negative weights are allowed,
but normalize weights such that they sum to 1.
This yields a practical solution, but usually unable to meet target return.

Portfolio Optimization for 10 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

 

Portfolio Optimization for 10 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

Problem:
Construct the Optimal Portfolio that:
delivers the target return (mu_Target)
with minimum risk
Minimize the risk of the portfolio (in this case, measured as half the variance)
While maintaining an expected return target of (mu_Target)
By adjusting the investment weights on each asset
Subject to the budget constraint that the weights sum to 1
Method:
Since constraints are equalities => We can use Method Lagrange
Supports up to 10 securities.
Able to do more if requested. Please contact us.

Constraints:
No short-selling (ie. No negative weights)

Solution 00:
Basic MPT with only budget constraint that weights sum to 1
Solution 01:
Tweaked solution where no negative weights are allowed,
but budget contraint fails, as sum of weights exceed 1.
Solution 02:
Maintain that no negative weights are allowed,
but normalize weights such that they sum to 1.
This yields a practical solution, but usually unable to meet target return.

Portfolio Optimization for 5 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

Portfolio Optimization for 5 Securities Using Lagrange Multipliers, No Short-Selling, Weights Sum to 1

Problem:
Construct the Optimal Portfolio that:
delivers the target return (mu_Target)
with minimum risk
Minimize the risk of the portfolio (in this case, measured as half the variance)
While maintaining an expected return target of (mu_Target)
By adjusting the investment weights on each asset
Subject to the budget constraint that the weights sum to 1
Method:
Since constraints are equalities => We can use Method Lagrange
Supports up to 5 securities.
Able to do more if requested. Please contact us.

Constraints:
No short-selling (ie. No negative weights)

Solution 00:
Basic MPT with only budget constraint that weights sum to 1
Solution 01:
Tweaked solution where no negative weights are allowed,
but budget contraint fails, as sum of weights exceed 1.
Solution 02:
Maintain that no negative weights are allowed,
but normalize weights such that they sum to 1.
This yields a practical solution, but usually unable to meet target return.

Portfolio Optimization for 4 Securities Using Lagrange Multipliers

Construct the Optimal Portfolio that:
delivers the target return (mu_Target)
with minimum risk
Minimize the risk of the portfolio (in this case, measured as half the variance)
By adjusting the investment weights on each asset
Subject to
Expected return target = mu_Target (specified by user)
Weights sum to 1 (ie. fully invested)
Weights can be negative

Risk: Value-at-Risk (VaR) Calculator for Portfolio of 12 Tickers


This Excel spreadsheet calculates Value-at-Risk (VaR) for a portfolio of up to 12 tickers
Parametric, Historical, Monte-Carlo simulated Value-at-Risk (VaR)
Mean, Standard Deviation, Variance, Correlation, Covariance
Incremental VaR for each ticker in the portfolio (without rebalancing)
Marginal VaR for each ticker in the portfolio (with rebalancing)
Cholesky Decomposition of the covariance matrix using built-in VBA function

Equity Index Participation

Equity Index Participation
Given a specified equity ticker, list the indices which contain it, and the corresponding weight of the ticker within each index.

Trading Strategy BackTesting (in Excel or Python)

Backtest any strategy for any asset class.
in Excel (.xlsm)
in Python (.ipynb on Google Cloud Platform).
Bloomberg historical data will be provided.
Contact us at quantbible@quantbible.com for a private discussion.

Option Chain Downloader

Live Price, Historical Prices, Option Chain.
1 Ticker at a time.
1 or All Expiration Dates with 1 click,
Puts or Calls or Both Puts and Calls in a straddle view.
All strikes in ascending order.

Demo Video:

Customized Quantitative Solutions for Derivative Pricing and Risk

  • Excel: Theoretical exploration of option theory and Greeks for Currencies, Fixed Income, Commodities, Equities
  • Excel, Bloomberg: Backtest option strategies like spreads, collars, straddles, covered calls, etc…
  • Excel, IB TWS API: Link with Interactive Brokers account for trading

Options, Derivatives, Warrants

Pricing, Valuation

Risk, Greeks

  • Model for Underlying: Normal, Log-Normal
  • Discounting at risk-free-rate
  • Exercise: European, American
  • Put, Call
  • Digital, Analog
  • Risk, Greeks: Delta, Gamma, Speed, Vega, Volga, Vanna, Theta, Rho (ppmu+ppr), Charm (Delta-Decay)
  • Implementation in Excel, Python
  • Automatically create customized price, risk, profit & loss (PnL) charts

About Us

  • Customizable

    Fully customizable to meet your needs.

  • Implementation

    Implementation in Excel, Python, Matlab

What others say about us

QQ Bird

Excellent and robust quantitative solutions.

QQ BirdQQ BirdQuant Bible