Application Center - Maplesoft

App Preview:

MyFinance

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




NULL

 

  

``

NULL

NULL

NULL

 

NULL

  The following was implemented in Maple by Marcus Davidsson (2013)

 davidsson_marcus@hotmail.com


with significant help from Axel Vogt (GetCSV)

 

 

 

 

 

1) Copy the two files (.mla and .hdb) to maple's lib folder ie in my case C:\Program Files (x86)\Maple 16\lib

2) Exit Maple, and then relaunch Maple.
3) You are set to go!

 

 

 

* Note one of the procedures uses  C:\\WINDOWS\\SYSTEM32
However I have a 64 bit computer and it still seems to works for me :-)


MyFinance Module

NULL

help("MyFinance")

``

NULL

1) PC = Percentage Changes for a row or column ordered price matrix

If time in the price matrix is increasing to the right or left then use the option row=true
If time in the price matrix is increasing up or down then use the option row=false

The return matrix always returns a percentage decimal form ie 0.02= 20%

2) GetCSV=Get a CSV file from a web url. Works with both http and https url's

 

GetCSV( url to csv file as a string)

Since the largest matrix the matrix browser in Maple can display is a 10001 x10001 matrix

Assign the datamatrix to a data table component to view the complete dataset

GetCSV uses C:\\WINDOWS\\SYSTEM32

3) CleanData=Remove extreme observations from the return matrix and substitute 0 for missing observations

If you want to nullify all abs(returns) > threshold ie 50% then type CleanData(datamatrix,50)

The cleaned return matrix is always expressed in percentage form ie 20%``

 

NULL

NULLNULL

``

``

restart; with(MyFinance); A := Matrix([[100, 100, 100], [120, 130, 95]]); PC(A, row = true); PC(A, row = false); evalf((1/120)*(130-120), 4); evalf((1/130)*(95-130), 4); evalf((1/100)*(120-100)); evalf((1/100)*(130-100)); evalf((1/100)*(95-100))

-0.5000000000e-1

(1)

``

``

   

Works for both http and https urls. (Maples HTTP[Get] only works for http not https)

z := GetCSV("https://dl.dropboxusercontent.com/s/9jt00m5rot81m6z/USA%20%28ETFs%29%20-%20Close.csv?token_hash=AAGLppBxYEHQnZj6iti4n8fZzyq9RnbKztVjdJdPm1EhZw&dl=1")

Vector(4, {(1) = ` 6 x 1416 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(2)

NULL

``

NULL

NULL

restart; with(MyFinance); z1 := GetCSV("http://www.quandl.com/api/v1/datasets/USER_18Q/18R.csv?&auth_token=BXckVSG3twWkV272c9Q4&trim_start=1968-04-01&trim_end=2013-04-12&collapse=daily&transformation=rdiff&sort_order=desc"); CleanData(z1, 10); [max(z1[2 .. (), 2]), min(z1[2 .. (), 2])]; [max(z1[2 .. (), 3]), min(z1[2 .. (), 3])]; [max(z1[2 .. (), 4]), min(z1[2 .. (), 4])]

[8.837, -9.281]

(3)

``

``

NULL

NULL

``

``

``

NULL