Three Questions(Integration with C#, Mean-Variance Optimization by using QuantLib, Optimization Methodologies in Excel)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Three Questions(Integration with C#, Mean-Variance Optimization by using QuantLib, Optimization Methodologies in Excel)

Kurt Lee
Hi there,
 
I am working as a Quantitative Researcher in a European asset management company in Korea.
 
I have two questions to ask for your help.
 
 
1) C# Wrapper
 
I am currently integrating QuantLib into my personal quant tool that is written in C# by using interoperability of .NET framework.
 
Since the SWIG version of QuantLib for C# doesn't seem enough to use, I decided to use the interoperability of .NET. I wonder whether I am thinking right or not. Quite a big number of classes and functions are sometimes not implemented in SWIG wrapper for C#. Even worse, some classes and functions have different names in the wrapper, too. Therefore it took pretty long time to find it that it is very very difficult to use the SWIG wrapper to integrate the QuantLib into my application.
 
Now I am integrating QuantLib by using the following architecture:
 
[My Quant Tool written in C#] <-> [Bridge code for interoperability written in C++/CLI] <-> [pure QuantLib in native C++]
 
Please let me know if I know something wrong or if there is any better way to integrate QuantLib or to utilize the SWIG wrapper.
 
 
2) Mean-Variance Optimization
 
I am also currently working on Mean-Variance Optimization by using Markowitz model.
 
I tried to use the Optimization Classes in QuantLib in order to optimize the Markowitz model and tried the Conjugate Gradient, Simplex and etc. in the QuantLib.
 
But after giving the Constraint of it that the sum of the weights should be 1.0 and the average return of the portfolio should be larger than given expected return, "update" method in LineSearch class fails its search after 200 times of tries.
 
Hence I replaced the break out condition of the number of maximum iterations which is given as 200 in the while loop of LineSearch class with the condition to break out the while loop when the diff factor becomes smaller than a very small value, but it seems that the solution doesn't converge into a global minima.
 
It's true that I have a very shallow knowledge of the optimization methodologies such as LP, QP, NLP and so on.
 
Can anyone help me to let me know if I can still use the optimization in QuantLib for MVO problem or not and if so, how to do that?
 
 
3) Optimization Methogologies in Excel
 
The solver in Excel seems to be really powerful and I found the name of the representative logic of the solver is called as GRG2(Generalized Reduced Gradient 2)
 
I tried to look for some papers describing the algorithm of the GRG2 in internet, but in vain.
 
GRG2 seems to be derived from one sort of gradient descent methodologies. Isn't it? But simple gradient descent seems not good enough for solving MVO problem.
 
Any comments about it? Or any good open source library or algorithm for it?
 
Thank you for your help in advance and happy Friday.
 
Regards,
Kurt CB Lee