i want to write a program to simulate a walk of a drunken sailor who walks out of a bar at the centre of a city. the city has a regular pattern of 24\24 square blocks. the sailor doesnt know where he is going and how to exist teh city. the question is how many blocks will he have to walk to exit the city?
let him start at the centre of the city and assume that he exists the city when he reaches either north, east, south or western borders. it can happen that he wlks...
Hi everyone,
Here is the code:
Ralpha:=sqrt(d)*IdentityMatrix(2):
alpha:=Array([WienerProcess(Ralpha),WienerProcess(Ralpha),WienerProcess(Ralpha),WienerProcess(Ralpha)]):
alpha1:=k->Vector[column]([[alpha[1](k)[1]],[alpha[1](k)[2]],[alpha[2](k)[1]],[alpha[2](k)[2]],[alpha[3](k)[1]],[alpha[3](k)[2]],[alpha[4](k)[1]],[alpha[4](k)[2]]]):
Finance[ExpectedValue](alpha1(0)[1]*alpha1(0)[1],timesteps=100,replications=10^4);
---->
I am confused by the below results.
Why does LSSolve (given an arbitrary expected return) produce a higher risk
adjusted return than QPSolve which explicity is given an objective to maximize
risk adjusted returns? ie minimize Transpose(W).Cov.W-Transpose(W).ev
This to me seems very strange?!
Also, how do you specify in the objective function for LSSolve to maximize
risk adjusted returns? Now we have simply provide LSSolve with some user specified
This is somewhat related to the interactive stock quote importer.
The TSX, DOW jones industrial average, FTSE 100, Heing Seng indexes are all a collection of stocks and their index reflects the movement of those stocks.
The Dow Jones Industrial average is designated ^DJI in finance.yahoo.com but that symbol is not available in the download.finance.yahoo.com from the interactive stock quoted importer. Is there perhaps a way I missed...
Now that Maple 15 is out, I thought I should share this little application I made: GoalTracker.mw. It is an application partially inspired by the BMI tracker in Nintendo's WiiFit application; you could easily use it to track a weight loss goal. But it could also be used to track other quantifiable goals. I am posting it here mostly because it takes advantage of two new features in Maple 15.
This guy Giorges is using Python and wget inorder to do parrallel downloading
and he is arguing that it is very fast.
http://keramida.wordpress.com/2010/01/19/parallel-downloads-with-python-and-gnu-wget/
Now my questions become
1) Does there exist a simple way that I can use wget without installing it ?
I dont want to bother users of my Maple application with installing a 3:rd party software.
A simple file in a specific location would be ok though
MATLAB has this Index extracting symbol function for yahoo finance (which works well in MATLAB)
I had a look at the Maple application "An Interactive Stock Quote Importer" www.maplesoft.com/applications/view.aspx
which is quite nice :-) I did not really understand how the author (Samir Khan Maplesoft ) managed to download
yahoo finance data directly inside Maple so I sent him an email asking. He sent me some quite nice code (which I
simply put in a procedure ) that downloads data for any specified ticker symbol from yahoo finance:
I want to retrieve data from google finance to do some analysis. Since the amount of data pieces are very huge. To aviod a huge amount of copy and past operations, I need to do it automatically in maple. So my question is how can I reduce the work in Maple as much as possible? I know google offers some APIs for retrieving data. Can I utilize that in Maple?
In older maple versions, calculating your monthly payments on a car, for example, have become a little more cumbersome.
Older versions had a built in function called finance, which has since been removed in the newer versions. The syntax for the command was finance(amount= , interest=, payments=, or periods=) you could leave out one and maple would calculate the unknown. The most common unknown was the amount of your monthly payments on a car which nowadays is usually a fixed finance level of 48 months.
The older maple syntax was
Hi,
I am just wondering who is currently using Maple in Finance. While I would keen to know any commercial or academic uses, I am especially interested in two areas:
1. Asset valuation and modelling
2. Portfolio analysis including risk, hedging, rebalancing or optimisation
3. High frequency (from 15min to readtime) processing of data (FX, Equity or IR)
We recently completed a quite extensive benchmarking of Maple, Mathematica and Matlab using finance and portfolio related problems and would be interested know other experiences here.
Heston's model is formulated in the language of stochastic processes (not my case at all) and translated to a PDE, where it is solved in Fourier space in closed form. The actual price of an option then is given by a Fourier inversion. The model gives a mean reverting behaviour for volatility and allows to reproduce 'volatility smiles' - both are stylish facts observable in markets (which the classical Black-Scholes model does not cover).
Here I show ways, how evaluation can be done within Maple in reasonable time: the involved integrands are very time consuming for numerical evaluation, but that can be simplified a lot using the codegen packag.
For those interested in financial Math:
A classical in mathematical finance is evaluating option prices by binomial trees. This has many advantages (like easy, but coarse results for American options), but it is well known to quite inaccurate for various reasons - even for European options. The 'best' known improvement is due to Leisen-Reimer. They all suffer from low order convergence towards a continuous model. The standard reference model is CCR, the Cox-Ross-Rubinstein tree.