• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Can't compute inverse of matrix by MINVERSE or User-Function VBA

Can't compute inverse of matrix by MINVERSE or User-Function

  • Can solve

    Votes: 2 100.0%
  • Can't solve

    Votes: 0 0.0%

  • Total voters
    2
Joined
4/11/14
Messages
11
Points
13
I have a 50x50 matrix in sheet1. I can't compute inverse of matrix by MINVERSE of Excel or User-Function VBA. But I can compute it with a 50x50 matrix in sheet2 (Random Matrix) by two functions.
Moreover, I can compute a 10x10 matrix of matrix in sheet1 with two functions.
Can you explain and resolve my problem in Excel VBA?

Best Regards,
Vinh
 

Attachments

  • Gauss Jordan for Inverse of Matrix.xlsm
    94.1 KB · Views: 185
  • Gauss Jordan for Inverse of Matrix.xlsm
    94.1 KB · Views: 95
I don't know and can't test this. But 50x50 matrix in sheet1 is the covariance-variance matrix. Because if we use MINVERSE function of excel, 50x50 matrix results to "#NUM". I think that results are too large and excel can solve it despite of Excel VBA.

Please help me solve this problem.

Best Regards,
Vinh
 
Normally in applications you never need to invert matrices but rather solve things like Ax = b where A is a matrix.
Is there a reason for wanting to have the inverse in explicit form then?
 
I am implementing the portfolio management modeling. So that I need to invert variance-covariance matrix.
Besides, I heard from my professor that portfolio management modeling without inverse of variance-covariance matrix is no mean and useless.

I never program in C# or the other languages, but only on Excel VBA. I don't know great mathematics procedure in C# or ... can compute the inverse of variance-covariance matrix that the value of variance-covariance matrix are very small like my Excel File.

Best Regards,
Vinh Huynh
 
... Not only variance-covariance matrix need to invert, but also many other types of matrices in Portfolio Management need to invert to implement portfolio management modeling.
 
I don't know and can't test this. But 50x50 matrix in sheet1 is the covariance-variance matrix. Because if we use MINVERSE function of excel, 50x50 matrix results to "#NUM". I think that results are too large and excel can solve it despite of Excel VBA.

Please help me solve this problem.

Best Regards,
Vinh

u can use excel MDETRM to get the determinant of the matrix.

A-1 x A = I, should give you the identity matrix I

you have too many negative numbers. it's like 1 divide by 0.

http://www.mathsisfun.com/algebra/matrix-inverse.html
 
Hi Keith Tan, I understood your explain. I checked, I think that det(A) is too too too small to express in Double variable.
So that do you think we need a double variable 256 or 512 bit to compute it.
Any other solutions for my problem about inverse of matrix ?

Best Regards,
Vinh
 
Last edited:
Hi Daniel Duffy, by the way, I want to ask you a question: "C# or C++ are suitable for Finance and Investment Programming? Especially for Portfolio Management Application with communication with stock exchange, getting data from internet, and processing data with large scale, inverse matrix, many optimization approaches and others. "
I am planning for studying C# for Finance and Investment. You can guide me that tasks of C# or C++ that I have to study to create applications in Portfolio Management, Financial Risk Management, and Financial Analysis.

Best Regards,
Vinh
 
Hi Daniel Duffy, by the way, I want to ask you a question: "C# or C++ are suitable for Finance and Investment Programming? Especially for Portfolio Management Application with communication with stock exchange, getting data from internet, and processing data with large scale, inverse matrix, many optimization approaches and others. "
I am planning for studying C# for Finance and Investment. You can guide me that tasks of C# or C++ that I have to study to create applications in Portfolio Management, Financial Risk Management, and Financial Analysis.

Best Regards,
Vinh

Hi Vinh,
You can use both, but I do see C# being useful for these kinds of applications. Here are some impressions that might help to give a more complete answer:

http://www.moneyscience.com/pg/blog...cial-markets-an-interview-with-daniel-j-duffy

Let me know if you have any queries.
hth
 
Hi, Daniel Duffy. The materials that you give, especially paper I think that it is hard to me because I have not a degree in mathematics.
So that, I want to know my inverse matrix problem that has any solutions. If any, give me details in VBA or programming codes.

Best Regards,
Vinh
 
Hi, Daniel Duffy. The materials that you give, especially paper I think that it is hard to me because I have not a degree in mathematics.
So that, I want to know my inverse matrix problem that has any solutions. If any, give me details in VBA or programming codes.

Best Regards,
Vinh
I 'm also interested in the way to compute the output of the inverse of a matrix by Excel to solve the optimization portfolio in finance. I just suggest you using Matlab for the problem and if you found the way to calculate the inverse by Excel, you could recommend this to me.
 
Why do you need to compute an inverse? No one does that anymore..

I could be wrong, but can you solve a matrix system Ax = b?

You need to formulate the problem first and then decide how to solve it.
 
Back
Top