ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 26 Feb 2012 15:42:07 +0100Possible? Mean-Variance Portfolio, Differential Calculus?https://ask.sagemath.org/question/8740/possible-mean-variance-portfolio-differential-calculus/Hello there
As a project for college we would like to calculate the Mean-Variance Porfolio out of 10 - 20 shares (underlying data:daily,800 days). This means there is differential calculus involved for generating the Optimum graph.
**Maths:**
Can Sage do the above?
How long does it take compared to other software/languages?
**Environment:**
We want the calculation Interface to be published at a website.
Is it just like taking a linux server, install sage and than request with our UI language (php,..js) to sage and scrap the result?
Good i found you, already love you ;)
Sun, 26 Feb 2012 09:16:34 +0100https://ask.sagemath.org/question/8740/possible-mean-variance-portfolio-differential-calculus/Answer by Shashank for <p>Hello there</p>
<p>As a project for college we would like to calculate the Mean-Variance Porfolio out of 10 - 20 shares (underlying data:daily,800 days). This means there is differential calculus involved for generating the Optimum graph.</p>
<p><strong>Maths:</strong>
Can Sage do the above?
How long does it take compared to other software/languages?</p>
<p><strong>Environment:</strong>
We want the calculation Interface to be published at a website.
Is it just like taking a linux server, install sage and than request with our UI language (php,..js) to sage and scrap the result?</p>
<p>Good i found you, already love you ;)</p>
https://ask.sagemath.org/question/8740/possible-mean-variance-portfolio-differential-calculus/?answer=13304#post-id-13304Can you be more specific about what functions you are trying to use. Sage supports most of symbolic calculus necessary for what I do. As far as interface with a website is concerned, I have done it using cgi, but should be possible with php also. Have a look at this
http://ask.sagemath.org/question/1166/implementing-sage-on-website
I would not recommend using the eval command as it is a security problem. But, you can import sage in python as a module. So you can write a cgi script in python and import sage. This is something I was able to do in a very short time. If you spend more time I am sure you can do better.Sun, 26 Feb 2012 15:42:07 +0100https://ask.sagemath.org/question/8740/possible-mean-variance-portfolio-differential-calculus/?answer=13304#post-id-13304