Fmincon for -X/Y where Y -> 0 (2024)

Discussion:

Fmincon for -X/Y where Y -> 0

(too old to reply)

M

2012-05-23 23:01:09 UTC

Permalink

I am using FMINCON for portfolio optimization and have a specific objective function that is giving me problems. I suspect it is due to the fact that it is a ratio where the denominator trends towards zero.

The specific formula that I am trying to optimize for is the Information Ratio, defined as:

% Return in excess of benchmark / Tracking Error
ir = - (ret - bmRet) / portTE(weights);

portTE is defined as:
te = 252*(x-cWgt)'*V*(x-cWgt) - TEmax^2;

Where x is the weights (being guessed by FMINCON), cWgt is the benchmark weights, and V is a covariance matrix.

I have constraints on the weights such as none can exceed a certain percentage of the portfolio, etc. so theoretically the portTE will not likely reach 0 (because the benchmark allows bigger weights)... but portTE will get increasingly smaller as the weights converge towards the benchmark weights nonetheless.

When I run the optimization, each iteration shows the result f(x) getting increasingly smaller, but the incremental steps are so large that it does not exit. Then after a certain point, the max constraint violation jumps and it starts showing "unreliable." (Example pasted below).

So... Is this just one of those types of problems that is not suited for FMINCON optimization? Or is this something that can be done and I just need a bit more guidance? Your advice is much appreciated!

Max Line search Directional First-order
Iter F-count f(x) constraint steplength derivative optimality Procedure
0 511 -0.0917309 0.2084 Infeasible start point
1 1022 -8.22854 4.441e-016 1 -132 111
2 1533 -12.3504 8.882e-016 1 -141 312
3 2044 -14.5376 9.992e-016 1 -206 304
4 2556 -18.3135 1.11e-015 0.5 -247 616
5 3068 -19.2534 4.441e-016 0.5 -559 664
6 3580 -43.4084 4.441e-016 0.5 -355 1.66e+003
7 4095 -46.0467 5.551e-016 0.0625 -870 986
8 4609 -66.8587 4.441e-016 0.125 -1.94e+003 1.58e+003
9 5122 -71.1512 2.22e-016 0.25 -1.04e+003 3.47e+003
10 5636 -81.1274 3.331e-016 0.125 -2.21e+003 1.93e+003
11 6155 -81.4471 0.009958 0.00391 -358 1.39e+003 unreliable
12 6675 -84.1157 0.009939 0.00195 -1e+003 2e+003 unreliable
13 7194 -86.1769 0.01128 0.00391 -1.39e+003 6.69e+003 unreliable
14 7714 -91.2555 0.01125 0.00195 -781 3.48e+003 unreliable

Matt J

2012-05-23 23:22:07 UTC

Permalink

Post by M
So... Is this just one of those types of problems that is not suited for FMINCON optimization? Or is this something that can be done and I just need a bit more guidance? Your advice is much appreciated!

===============

Well, the Hessian of ir looks like it could get highly singular as porTE gets smaller, which could cause numerical problems I suppose. It seems that instead of minimizing ir, you could equivalently be minimizing the following simpler function (it varies monotonically with ir)

f(x) = (x-cWgt)'*V*(x-cWgt)

If you have no non-linear constraints, you could even use QUADPROG for this instead, which would take advantage of the quadratic form of f(x).

Johan Löfberg

2012-05-24 07:54:09 UTC

Permalink

Sounds like a variant of Sharpe ratio optimization, which you normally can/should reformulate as QP. (maybe tricky here due to the TEmax^2 term, otherwise it would be exactly Sharpe ratio)

If not, you are correct in the observation that solvers don't like when you divide by things that can move towards zero, either at optimality or during solution process. Simple trick is to reformulate as

maximize t

s.t

(ret - bmRet) > t*portTE(weights)

Post by M
I am using FMINCON for portfolio optimization and have a specific objective function that is giving me problems. I suspect it is due to the fact that it is a ratio where the denominator trends towards zero.
% Return in excess of benchmark / Tracking Error
ir = - (ret - bmRet) / portTE(weights);
te = 252*(x-cWgt)'*V*(x-cWgt) - TEmax^2;
Where x is the weights (being guessed by FMINCON), cWgt is the benchmark weights, and V is a covariance matrix.
I have constraints on the weights such as none can exceed a certain percentage of the portfolio, etc. so theoretically the portTE will not likely reach 0 (because the benchmark allows bigger weights)... but portTE will get increasingly smaller as the weights converge towards the benchmark weights nonetheless.
When I run the optimization, each iteration shows the result f(x) getting increasingly smaller, but the incremental steps are so large that it does not exit. Then after a certain point, the max constraint violation jumps and it starts showing "unreliable." (Example pasted below).
So... Is this just one of those types of problems that is not suited for FMINCON optimization? Or is this something that can be done and I just need a bit more guidance? Your advice is much appreciated!
Max Line search Directional First-order
Iter F-count f(x) constraint steplength derivative optimality Procedure
0 511 -0.0917309 0.2084 Infeasible start point
1 1022 -8.22854 4.441e-016 1 -132 111
2 1533 -12.3504 8.882e-016 1 -141 312
3 2044 -14.5376 9.992e-016 1 -206 304
4 2556 -18.3135 1.11e-015 0.5 -247 616
5 3068 -19.2534 4.441e-016 0.5 -559 664
6 3580 -43.4084 4.441e-016 0.5 -355 1.66e+003
7 4095 -46.0467 5.551e-016 0.0625 -870 986
8 4609 -66.8587 4.441e-016 0.125 -1.94e+003 1.58e+003
9 5122 -71.1512 2.22e-016 0.25 -1.04e+003 3.47e+003
10 5636 -81.1274 3.331e-016 0.125 -2.21e+003 1.93e+003
11 6155 -81.4471 0.009958 0.00391 -358 1.39e+003 unreliable
12 6675 -84.1157 0.009939 0.00195 -1e+003 2e+003 unreliable
13 7194 -86.1769 0.01128 0.00391 -1.39e+003 6.69e+003 unreliable
14 7714 -91.2555 0.01125 0.00195 -781 3.48e+003 unreliable

2 Replies
1 View
Permalink to this page
Disable enhanced parsing

Thread Navigation

M 2012-05-23 23:01:09 UTC
Matt J 2012-05-23 23:22:07 UTC
Johan Löfberg2012-05-24 07:54:09 UTC
Fmincon for -X/Y where Y -> 0 (2024)
Top Articles
Waarom Meloni's anti-woke beleid een voorbeeld is voor politiek Den Haag - NieuwRechts.nl
Ik ben een vrouw en ging de grens over bij een andere vrouw
It may surround a charged particle Crossword Clue
Best Big Jumpshot 2K23
CLI Book 3: Cisco Secure Firewall ASA VPN CLI Configuration Guide, 9.22 - General VPN Parameters [Cisco Secure Firewall ASA]
Mylaheychart Login
Ashlyn Peaks Bio
Okatee River Farms
Jesse Mckinzie Auctioneer
Rochester Ny Missed Connections
Phillies Espn Schedule
Simple Steamed Purple Sweet Potatoes
Jasmine Put A Ring On It Age
Oc Craiglsit
Flower Mound Clavicle Trauma
House Of Budz Michigan
Mzinchaleft
Napa Autocare Locator
Danforth's Port Jefferson
Indiana Wesleyan Transcripts
Indystar Obits
Ecampus Scps Login
Bill Remini Obituary
How To Tighten Lug Nuts Properly (Torque Specs) | TireGrades
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
4Oxfun
Is Poke Healthy? Benefits, Risks, and Tips
Motorcycle Blue Book Value Honda
Noaa Marine Forecast Florida By Zone
J&R Cycle Villa Park
Was heißt AMK? » Bedeutung und Herkunft des Ausdrucks
Chicago Pd Rotten Tomatoes
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Does Iherb Accept Ebt
Today's Gas Price At Buc-Ee's
Bismarck Mandan Mugshots
Craigslist Lakeside Az
Nba Props Covers
Craigslist Freeport Illinois
Pro-Ject’s T2 Super Phono Turntable Is a Super Performer, and It’s a Super Bargain Too
5A Division 1 Playoff Bracket
Mbfs Com Login
Sarahbustani Boobs
Cleveland Save 25% - Lighthouse Immersive Studios | Buy Tickets
Po Box 101584 Nashville Tn
Florida Lottery Powerball Double Play
Walmart Careers Stocker
The Many Faces of the Craigslist Killer
Craigslist Sparta Nj
Stephen Dilbeck, The First Hicks Baby: 5 Fast Facts You Need to Know
53 Atms Near Me
OSF OnCall Urgent Care treats minor illnesses and injuries
Latest Posts
Article information

Author: Kareem Mueller DO

Last Updated:

Views: 5357

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Kareem Mueller DO

Birthday: 1997-01-04

Address: Apt. 156 12935 Runolfsdottir Mission, Greenfort, MN 74384-6749

Phone: +16704982844747

Job: Corporate Administration Planner

Hobby: Mountain biking, Jewelry making, Stone skipping, Lacemaking, Knife making, Scrapbooking, Letterboxing

Introduction: My name is Kareem Mueller DO, I am a vivacious, super, thoughtful, excited, handsome, beautiful, combative person who loves writing and wants to share my knowledge and understanding with you.