Items tagged with finance

Ibragimova Evelina, 6 class,
school № 57, Kazan

The manual with examples
( templates for the solution of )

The solution of problems on simple interest


> restart:
> with(finance);

[amortization, annuity, blackscholes, cashflows, effectiverate,

futurevalue, growingannuity, growingperpetuity, levelcoupon,

perpetuity, presentvalue, yieldtomaturity]

Team futurevalue (the first installment, rate, period) - the total calculation for a given down payment, interest rate, payments and number of periods.

Example 1. To the Bank account, the income of which is 15% per annum, has made 24 thousand rubles. How many thousands of rubles will be in this account after a year if no transactions on the account will not be carried out? (The answer: 27.60 thousand rubles.)

> futurevalue(260,0.40,1);


> evalf(1000/216);

> 364*3;


> u:=fsolve(presentvalue(1e6,x,1250)=950,x)*950;

u := 5.303626495


Team presentvalue (future amount, rate, period) - the calculation of the initial input to obtain a specified final amount at an interest rate of charges and the number of periods.

Example 2. How much you need to put money in the Bank today, so that when the rate of 27% per annum have in the account after 10 years 100000 thousand rubles? (The answer: 9161.419934 rubles.)

> presentvalue(680,-0.20,1);



The solution of problems in compound interest

The solution of problems 
Using commands <futurevalue> и <presentvalue >
> restart;
> with(finance):
Direct task
> futurevalue(,0.,);
`,` unexpected
The inverse problem
> presentvalue(,0.,);
`,` unexpected

I. Case with the same interest rate every period

Using the universal formula F = P*(1+r)^n; , where:
F - the future value (final amount).
P - the initial payment (current amount).
r - the interest rate period.
n - the number of periods.
This formula for the case with the same interest rate every period

> restart:
The task of the formula
> y:=F=P*((1+r)^n):
> y;

F = P (1 + r)

The job parameters are known quantities
The interest rate

> r:=;
`;` unexpected
The number of years (periods)
> n:=3;

n := 3

The initial payment (present value)
> P:=;
`;` unexpected
The final amount
> F:=2.16;

F := 2.16

The solution of the equation - the calculation of unknown values (in decimal form)
> `Unknown`;fsolve(y);




II. The case of different interest rates for each period

Formula An = A*(1+1/100*p1)*(1+1/100*p2)*(1+1/100*p3); ... %?(1+1/100*pn); , where
An - the final amount
A - the initial payment (current amount at the moment)
p1, p2, p3, .... pn - interest rate periods
n - the number of periods

> restart:
The task of the formula (need to be adjusted based on the number of periods)
> y:=An=A*(1+1/100*p1)*(1+1/100*p2)*(1+1/100*p3):
> y;

An = A (1 + 1/100 p1) (1 + 1/100 p2) (1 + 1/100 p3)

The task of the parameters of the known values
The initial payment (present value)
> A:=;
`;` unexpected
Interest rate periods

p1 := .30

p2 := .10

p3 := .15

The final amount
> An:=;
`;` unexpected
The solution of the equation - the calculation of unknown values (in decimal form)
> `Unknown`;fsolve(y);





I want to extract all the symbols and last trade from

I have tried:

status, data, headers := HTTP:-Get("");

but it just gives me a bunch of jiberish! Any ideas?

This question is probably for maple devs...

I was wondering if it would be possible to outline what algorithm is used to generate replications (realizations) for various processes by the Finance:-SamplePath command (and friends). For example in the code like this:


X := WienerProcess();
A := SamplePath(X(t), t = 0 .. 1, timesteps = 100, replications = 20);

Is it the Euler-Maruyama method?

Alternatively maybe you can show the portion of the code that is responsible for the integration of the SDE that the Wiener process defines.

I can't find any details related to this information in the help, and it would be very helpful to know this (and more importantly have it in the help section).



I tried to use the Finance package and got:

Warning, some commands in the Finance package may not work on this platform
Y := ItoProcess(1.0, mu, sigma, x, t);

Error, (in Finance:-ItoProcess) external linking: error loading external library finance.dll: The specified module could not be found.


Is it me or my pc that is causing this?

Thank you.


X:=RandomVariable(Binomial(nn, pp));

read "D:/diffalg03/stochastic9";
Sigma := `<,>`(`<|>`(1.0, .5), `<|>`(.5, 1.0));
V := WienerProcess(Sigma);
Z := t -> exp(a*t+b*V(t)[1]+c*V(t)[2]);
drift1 := simplify(Drift(Z(t))/Z(t));
diffusion1 := simplify(Diffusion(Z(t))/Z(t));
linearsde(drift1, diffusion1[1][1]);

1.what are a, b, and c?

2. how to convert SDE for monte carlo for this ito formula?

3. how to convert to euler scheme with this ito formula


I was using the Finance package and used the command ImpliedVolatilitySurface(...). But it is showing the following error 
"Error, (in Finance:-ImpliedVolatilitySurface) external linking: error loading external library finance.dll: The specified module could not be found."Please help..

Consider the problem of borrowing $250,000 to buy a house.  You borrow the money at a fixed interest rate of 4.8% compounded monthly.  The term of the mortgage is for 20 years....

Trying to create multi-dimensional geometric brownian motion by using:

W := GeometricBrownianMotion(Vector(N, 1), Vector(N), B.B^%T);

but receive the following error message:

Error, (in Finance:-GeometricBrownianMotion) invalid input: ProcessOptions expects its 1st argument, x0, to be of type realcons, but received Vector(2, {(1) = 1, (2) = 1})

The vectors and B.B' matrix are fine, because

W := BrownianMotion(Vector(N, 1), Vector(N), B.B^%T);

... is finance.dll missing in Maple16 (64 bit), as it was in Maple15 (64 bit), so you have to install the 32 bit version instead?

Is it possible to move the finance.dll-file from Maple16(32-bit) to Maple16(64-bit)?


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:






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 but that symbol is not available in the from the interactive stock quoted importer.  Is there perhaps a way I missed...

This guy Giorges is using Python and wget inorder to do parrallel downloading
and he is arguing that it is very fast.

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

1 2 Page 1 of 2