Help:Contents
From FinMath
This page contains instructions for contributing content to this site. If you want to help this undertaking in other ways see site support. If you simply wish to use code from the repository, see quick start. If you are looking for something to do see Projects.
Contents |
[edit] Editing pages
If you are new to Wiki's, click the "edit" tab on near the top of this page.
[edit] Basic editing
For more information see the Wikipedia entry on how to edit a page.
[edit] Page discussion
If these instructions can be improved, please do so now or at the very least make suggestions by clicking the discussion tab. By logging in you also create a user page which is quite useful for collaboration. You can sign off on comments with
~~~~myUserName
which will link to your user page. External links are created with single brackets
[http://www.wikipedia.org Wikipedia]
and internal links are created with double brackets
[[Another page]] or [[Another page|another]]
[edit] Tables
pipe syntax tutorial (wikipedia)
[edit] Editing mathematics formulas
Latex commands can be used within math tags. Click the edit tab to see this example.
To display the mathematics within a line use a colon before the math tag
:<math>\int_0^\infty e^{-x^2}\,dx</math>
A detailed discussion Help:Formula discussion and examples can be found at Wikipedia. This latex symbol list may be helpful and there are plenty of Latex guides online. See also the Wikipedia manual of style specific to mathematics articles.
[edit] Creating a new page
Several methods. The last of the three is preferred.
- Insert an internal link in an existing article using double square brackets. For example,
For more information please refer to [[My new article]]
Then save the page and click on the link you just created.
- Enter the URL for you desired page in the browser. For instance:
http://www.financialmathematics.com/wiki/A_new_page
- Enter the name of your page in the search box. If it doesn't already exist you will be prompted to create a new page.
[edit] Including a data file on a page
The easiest way is to create an internal link
[[Media:myUploadedFile|myUploadedFile]]
on your page, save it and then click on the link. You will be prompted to upload the file.
[edit] Guidelines
Because the subject matter here includes code, commercial activities, future events and things of interest to a small number of people there are and must be few rules here. We are not about building an encyclopedia but ascetic and style cues can be taken from the Wikipedia manual of style. In particular, please do not interrupt the flow of thought by linking every third word, or discount the utility of this feature with excessive external links to sites resembling Times Square. On the other hand, please do treat external links to Wikipedia, Copula Wiki, and similar on an equal footing with internal links. Bold text
[edit] Sandbox
The following sandboxes are available for you to experiment with. Feel free to go ahead and edit them to get an idea of how a Wiki works and how it is edited.
[edit] Matlab Code Development
Some recommendations for code development (suggestions welcome).
[edit] Creating a new toolbox
On this site toolboxes are just pages created as above like any other and named "Code:something". For example, you could type
http://www.financialmathematics.com/wiki/Code:my_new_toolbox
in the address bar of your browser or "Code:my_new_toolbox" in the search box to the left. To include Matlab code use matlab tags. For example, including the following text in your page
<matlab doesVeryLittle.m> function result = doesVeryLittle result = rand(1); </matlab>
will accomplish three things. First, the syntax highlighted Matlab code will appear on your page like this:
function result = doesVeryLittle result = rand(1);
allowing users to click through to the Mathworks documentation for rand. Second, the code will be automatically included in the repository. Third, anyone can ensure the existence of this file on their computer with
fmuse('/my_new_toolbox','doesVeryLittle.m');
[edit] Modifying existing code
This site is something of an experiment so there are no hard and fast rules. The following steps have proven reasonably successful. It is probably a bad idea to modify code in your prefdir directly, since this may be overwritten my fmuse.m and lead to loss of code, sanity etc. Instead we recommend:
- Start Matlab in a working directory free of potentially conflicting matlab files and not on the Matlab path. Cut and paste
mkdir(prefdir,'fin_math');delete(which('fmgrow.m')); urlwrite('http://www.financialmathematics.com/code/fin_math/fmgrow.m',fullfile(prefdir,'fin_math','fmgrow.m')); addpath(fullfile(prefdir,'fin_math')); fmgrow;
into a startup.m file in your working directory.
- Open a new blank file in the Matlab editor and literally cut and paste the code from the wiki page. Save the file and debug or improve it (the version in the current directory is called before the one in prefdir, even if the latter exists).
- If major modifications have been made, a complete cut and paste back into the wiki may be best. The wiki page history uses a reasonably intelligent difference engine. If minor modifications have been made it may be convenient to edit only a few lines of the wiki page.
- Run the repository version of the code. One way to do this is to change directory out of your working folder, wait sixty seconds for the repository to update, delete the existing file under prefdir for good measure and download the repository version with fmuse('/my_toolbox','myFile.m'). We suggest once again that the working folder not be in the Matlab directory. It is easy to delete the version in prefdir with the following command:
delete(which('myfile.m'))
We're resisting the temptation to write utilities like fmclobber.m until fmuse.m is stable.
[edit] Blowing away your FinMath cache
It is considered good practice to blow away your /<prefdir>/urlpath/www_financialmathematics_com/ directory once in a while. You cannot be assured that your code will run on other people's machines just as it does on yours until you do this. Files in your FinMath cache can become stale and are not automatically updated by fmuse.m (for performance, stability and security). Files in your FinMath cache may reside on your path accidentally (because fmuse has downloaded another function into the same directory) and this may explain your program working in one session but not in another. We suggest doing this manually in the Matlab IDE beginning with
cd(prefdir)
One can navigate into urlpath in the Matlab directory browser and destroy www_financialmathematics.com.
[edit] Including proprietary code or data files
You may upload .p .mat .fig and other files as described above. The files are uploaded to a directory determined by WikiMedia (hashing the file name) but if a link is included on a Code: page the file will also appear in the repository under the correct directory. For an example see the bespoke cdo examples page.
[edit] See also
- Quick start, Why, How, About, Where
