tag:blogger.com,1999:blog-29531536797596282902023-11-16T13:39:00.556-05:00QuantLib on the iPhone On building an integrated QuantLib/Lua platform on the world's most popular computer.Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.comBlogger38125tag:blogger.com,1999:blog-2953153679759628290.post-62278452787156724992013-07-19T13:26:00.004-04:002013-07-19T13:26:57.523-04:00Discount to $1.99For a short time only! $1.99.<br />
<br />
You get the full package.Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-33125260566250657272013-07-04T21:09:00.000-04:002013-07-04T21:09:11.423-04:00Introduction to downloading financial data addedA short introduction to downloading financial data has been posted. It's available at <a href="http://quantlua.com/WP/2013/07/05/downloading-financial-data/">http://quantlua.com/WP/2013/07/05/downloading-financial-data/</a>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-80184307770161393992013-06-22T21:31:00.000-04:002013-06-22T23:19:16.963-04:00Six Reasons to get QuantLua<b><a href="http://quantlua.com/" target="_blank">QuantLua</a></b> is a new app available on the app store. It is made especially for people in quantitative finance, or learning finance and financial engineering, but useful for others too. It consists of two main parts: the QuantLib/Lua programming environment and the historical stock simulator. These two components can be used separately, but have been built to work together well. With QuantLua you are able to download historical data, analyze it and display it in various ways.<br />
<br />
Here are 6 good reasons why you want to get QuantLua.<br />
<br />
1. <b>The graphics are impressive.</b> What other app allows you construct your own plots to analyze various aspects of the stock market? You are not constrained by the graphs provided, you can take the examples provided and make them suit you.<br />
<br />
2. <b>There are many functions at your disposal</b>, and many more to come. QuantLua is built on two well tested pillars, <a href="http://www.lua.org/" target="_blank">Lua</a> and <a href="http://quantlib.org/" target="_blank">QuantLib</a>. Lua is a full fledged programming language with features not found in other languages. QuantLib is a powerful computational finance library providing with lots of functionality. If you do not find the function you need, you can create it yourself or <a href="mailto:tgwena@gmail.com" target="_blank">ask.</a><br />
<br />
3. <b>It is fun and educational</b>. The stock simulator can be used to teach about how the stock market works. It can be used as game to test how good a trader you are (or were) compared to your friends.<br />
<br />
4. <b>It is cheap</b>. There is no other program on any platform with as much functionality as QuantLua at such a low low price. Only custom built platforms costing tons of money can provide such functionality.<br />
<br />
5. <b>You are in control</b>. We have provided examples of what you can do, but ultimately you are not hemmed in by our examples. You can try your own ideas, including things we have never imagined.<br />
<br />
6. <b>There is support</b>. QuantLib has a very strong online community where you can learn more on how to use it. Lua has been around for a very long time and has gathered a huge following due to its versatility. As always, <a href="mailto:tgwena@gmail.com" target="_blank">we are always here to help</a>.<br />
<br />
<br />
So don't hesitate: head over to the <a href="https://itunes.apple.com/us/app/quantlua/id653280054?ls=1&mt=8" target="_blank">iTunes App store and grab yourself a copy</a><br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-61281709075212919022013-06-22T20:30:00.001-04:002013-06-22T20:30:15.820-04:00Introduction to the plot command.An introduction to the <b>plot </b>command is now up at <a href="http://quantlua.com/WP/2013/06/23/the-quantlua-plot-command/" target="_blank">the quantlua support site</a><br />
<br />
This is one of the most important commands as it enables you to create a wide range of plots.Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-62539343906814083702013-06-20T21:44:00.001-04:002013-06-20T21:44:01.227-04:00Discount for a limited time.QuantLua will be selling at 40% discount from now until the end of the month.<br />
<br />
Hurry while offer lasts!Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-36673699305412669552013-06-14T18:52:00.000-04:002013-06-15T19:15:22.652-04:00QuantLua now approved for the iTunes App store.QuantLua has been approved for the app store and is scheduled to appear shortly.<br />
<br />
<a href="https://itunes.apple.com/us/app/quantlua/id653280054?ls=1&mt=8">The app is available here</a><br />
<br />
<br />
<br />
<span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">QuantLua is the most comprehensive financial application available for the iPhone. It has these main features:</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">-A programmable historical stock simulator for select US stocks</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">-The most comprehensive finance calculator available, incorporating the QuantLib quantitative finance library and the programming language Lua.</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">-Excellent graphics library for building your own plots. It includes line graphs, bar graphs and pie charts.</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">The historical stock market simulator is for select US stocks. It enables you to build a portfolio and see how the strategy would have performed over time. It is also fully programmable, enabling the analysis of dynamic strategies.</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">Also included is a historical stock and currency data feed. This imports stock data from Yahoo Finance and currency data from OANDA directly into the Lua programming engine.</span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"> </span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;"><br /></span><span class="Apple-style-span" style="font-family: 'Lucida Grande', Geneva, Verdana, Arial; font-size: 12px; font-weight: bold;">All this is powered by Lua, an intuitive and complete programming language well suited to financial analysis.</span>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-81231344625363650452013-06-11T13:52:00.001-04:002013-06-11T13:52:14.489-04:00Small fix for an example script The script "UserScripts/Graphics/Function" has a small bug. It should be<br />
<br />
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">-- define function<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">local function fc(x)<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";"> return math.cos(x)<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">end<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">local function fs(x)<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";"> return math.sin(x)<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">end<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">plot({f=fs,x={0.5,4},p=20,r=1,w=1,c=2},<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin: 0in 0in 0pt;">
<span style="font-family: "Courier New"; font-size: 9pt; mso-fareast-font-family: "Times New Roman";">{f=fc,x={1,5},c=1,r=1,w=1})<o:p></o:p></span></div>
Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-73094367194584027802013-06-07T18:35:00.001-04:002013-06-07T18:35:41.424-04:00QuantLua submitted to app storeNow awaiting approval. :-)Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-62816457667243043232013-04-11T21:39:00.001-04:002013-04-11T21:39:07.673-04:00Call for testers!I am in the process of testing the application QuantLua in preparation for release in the next few weeks. If you would like to test it then please contact me on tgwena(a)gmail.com and we can make arrangements.<br />
<br />
Hurry! Space is limited (by Apple)Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-40970198396727398212013-04-08T23:47:00.001-04:002013-04-08T23:47:24.964-04:00Life on the big(ger) screen (iPhone 5)The iPhone 5 display provides more space for bigger, better graphs. Look at the examples below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiddKMglM9OV5D4yRePCZSnBZ2iCBlPObnGiFZiMSUtfwsg2MCezYTgcuzVwSnFRUdpbGloRxIsSWfqWP7xU_Cpeokh2nOtxoaebbnn09qDQu7NyHynY2BRrCJWy5qA6_k7V54K7EOndgQU/s1600/IMG_0887.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiddKMglM9OV5D4yRePCZSnBZ2iCBlPObnGiFZiMSUtfwsg2MCezYTgcuzVwSnFRUdpbGloRxIsSWfqWP7xU_Cpeokh2nOtxoaebbnn09qDQu7NyHynY2BRrCJWy5qA6_k7V54K7EOndgQU/s320/IMG_0887.PNG" width="180" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80bbhB9VXocFgXRjKKckjIq619zGCrI4WIDA9O_ux-Tf_pVSTzCwbSyp3lhBZdufpE6nGVFQv9v-iSHxiXF8sp0qqK7bIzhlMfohMs15dmHuAEAGHNBETOB5U06PxlNEDszq50oGMXkG_/s1600/IMG_0880.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg80bbhB9VXocFgXRjKKckjIq619zGCrI4WIDA9O_ux-Tf_pVSTzCwbSyp3lhBZdufpE6nGVFQv9v-iSHxiXF8sp0qqK7bIzhlMfohMs15dmHuAEAGHNBETOB5U06PxlNEDszq50oGMXkG_/s320/IMG_0880.PNG" width="180" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-67478820402338891712013-03-24T05:08:00.000-04:002013-03-24T05:08:10.017-04:00iPhone 5 and instruction manualJust completed porting to iPhone 5. Running on a dual core machine presented interesting challenges.<br />
<br />
Also put up a draft of the <a href="http://quantlua.com/help.html">instruction manual</a>.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-32054053854897687322013-02-03T18:19:00.001-05:002013-02-04T18:38:24.863-05:00Feature list.This is a comprehensive summary of the features found in Financial Game (provisional name, subject to change)<br />
<br />
1. A programmable simulation engine using historical stock prices<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL3PwzXY_XOV8y2UFKPUgriPEWvbLONPFnF0AKTngZunzeqOhNu03BlaZYrOduRrXmeByvZIyTUqprFznHJNdzKSNYf5UU1HVYehxbCx-QRNFwgu6i_VZloEbsjaJ3qhuZZTon2l9Nenx5/s1600/photo-4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL3PwzXY_XOV8y2UFKPUgriPEWvbLONPFnF0AKTngZunzeqOhNu03BlaZYrOduRrXmeByvZIyTUqprFznHJNdzKSNYf5UU1HVYehxbCx-QRNFwgu6i_VZloEbsjaJ3qhuZZTon2l9Nenx5/s320/photo-4.PNG" width="213" /></a></div>
<br />
<br />
<br />
2. A comprehensive calculator with the following<br />
<br />
a. Programmable in <a href="http://www.lua.org/">Lua</a>, a stable mature language well suited to financial calculations.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDT_1CrtVFMwOXBx90Tz_tOewKrRoUOijbfo0-dnanCFSLCG5gxRcVSl1NEnDz4wXnpMqKzLP33Jr2D66P3fGjck99HqGgnDkexRiYkkaH_d3vYMPX9C4pBPn-2vdhKz-j4J9ei1a2iDEP/s1600/photo-5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDT_1CrtVFMwOXBx90Tz_tOewKrRoUOijbfo0-dnanCFSLCG5gxRcVSl1NEnDz4wXnpMqKzLP33Jr2D66P3fGjck99HqGgnDkexRiYkkaH_d3vYMPX9C4pBPn-2vdhKz-j4J9ei1a2iDEP/s320/photo-5.PNG" width="213" /></a></div>
<br />
<br />
<br />
b. Full access to the <a href="http://quantlib.org/index.shtml">QuantLib financial library</a><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-pcj4PuUcR6gP4tBM2dwQujrjBRr_HREcGwFCQzJQGZMLz6KuXqh45RnAdqdztxYVYu2nYG9cDwfwFnE6lXo3SbTfZguHbtJWgsaIQuQgoqYpiJTlNhfvT8a3X6zXV0EbaDD-kfAj-oMy/s1600/photo-1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-pcj4PuUcR6gP4tBM2dwQujrjBRr_HREcGwFCQzJQGZMLz6KuXqh45RnAdqdztxYVYu2nYG9cDwfwFnE6lXo3SbTfZguHbtJWgsaIQuQgoqYpiJTlNhfvT8a3X6zXV0EbaDD-kfAj-oMy/s320/photo-1.PNG" width="213" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4erS9-TW92rU_H-gzCt8s5u_Cybp3fD8YVvtM67yidiSCPvXn-caIiiOnh1gGI561VKE7fe3ml2dOXpXFmOcQ3q7PpJegbWJBWrssedRTWiurzBDDX5p_0sC3ThD4_JzJkl8xeUDZPtYQ/s1600/photo.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4erS9-TW92rU_H-gzCt8s5u_Cybp3fD8YVvtM67yidiSCPvXn-caIiiOnh1gGI561VKE7fe3ml2dOXpXFmOcQ3q7PpJegbWJBWrssedRTWiurzBDDX5p_0sC3ThD4_JzJkl8xeUDZPtYQ/s320/photo.PNG" width="213" /></a></div>
<br />
<br />
c. Extensive graphics capabilities, including line graphs, pie charts, bar graphs.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqtdsts9aWQ2H8Xxe6BFZZnXaZxMzu-tcTsTmp8oPADvntW7aAt_RsuaPVQ-Ra36gNeocpk2aw4SYVx1mbwa4OqnYobocFzwHtInF1cKbE3V9KVf3llM6JBkcb1-nZUE8wR7bhAmqZu_9s/s1600/photo-6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqtdsts9aWQ2H8Xxe6BFZZnXaZxMzu-tcTsTmp8oPADvntW7aAt_RsuaPVQ-Ra36gNeocpk2aw4SYVx1mbwa4OqnYobocFzwHtInF1cKbE3V9KVf3llM6JBkcb1-nZUE8wR7bhAmqZu_9s/s320/photo-6.PNG" width="213" /></a></div>
<br />
<br />
d. Access to historical stock and currency data<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8bljyugCSHPceuovsRQJiBRJEJMmL5LMZYSXew8qYRlMWZ435XrDDccxa2e1otJGn1Jq1Ek-mPcDFJArTW57F8M7AwHy7B0g0iBd9vOpN6jlCQrv9frr-MW-lLIApbfLK0DyZh0Z0ogkK/s1600/photo-2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8bljyugCSHPceuovsRQJiBRJEJMmL5LMZYSXew8qYRlMWZ435XrDDccxa2e1otJGn1Jq1Ek-mPcDFJArTW57F8M7AwHy7B0g0iBd9vOpN6jlCQrv9frr-MW-lLIApbfLK0DyZh0Z0ogkK/s320/photo-2.PNG" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheOufOzFai5qw772JzefQ-8nCok9o-oNj8AH3pByOmzqfuCLBPGzV4xh5WD5VHw_gtEsBP_yyTfeoqPOKzrl2kGZazLC31xAZ3sKnt-vGGsqXVniqkAp4mBJGfsTyfsiRYSwn6a3lQLgDY/s1600/photo-7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheOufOzFai5qw772JzefQ-8nCok9o-oNj8AH3pByOmzqfuCLBPGzV4xh5WD5VHw_gtEsBP_yyTfeoqPOKzrl2kGZazLC31xAZ3sKnt-vGGsqXVniqkAp4mBJGfsTyfsiRYSwn6a3lQLgDY/s320/photo-7.PNG" width="213" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-45021033164205884692013-01-31T14:55:00.000-05:002013-01-31T14:56:12.510-05:00Running two historical simulationsRunning two simulations of IBM starting from 1981 going through the 1987 crash.<br />
<br />
The code for the first simulation:<br />
<pre><code>
</code><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">local s=stock("ibm")</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">local p=currpf()</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">if s:price(-1)>s:price() and p/s<10 then</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;"> _=p+10*s</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">end
if s:price(-1) <s:price() and p/s>0 then</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;"> _=p-10*s</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">end</span><code>
<!--10--><!--10--></code>
</pre>
This code is run daily and does the following: Buy 10 IBM stock if yesterday's price is higher than today, otherwise sell if yesterday's price is lower. This is essentially bucking the trend. This is the blue line.
<br />
<br />
The second simulation does the opposite (this is the red line):
<br />
<pre><code>
</code><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">local s=stock("ibm")</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">local P=currpf()</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
if s:price()>s:price(-1) and P/s<10 then</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
_=P+10*s</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
end</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
if s:price()<s:price(-1) and P/s>0 then</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
_=P-10*s</span></pre>
<pre><span class="Apple-style-span" style="border-collapse: collapse; color: #222222; font-family: arial, sans-serif; font-size: 13px; white-space: normal;">
end</span><code> </code></pre>
<br />
The results of the simulation are in the graph below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcyqBueA3pep6VuVqB8KcCWQMoF-anR84N-Tt6OXRHjfs-2qjaxHG-TENhAhXAuA04jtz2DfWXwEhruTWASK_dyBYd78LmmRbV8DIc_5vVO76EnE6zU7JBOy_mR_-gTJN9MPC9hF70dKPc/s1600/photo-2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcyqBueA3pep6VuVqB8KcCWQMoF-anR84N-Tt6OXRHjfs-2qjaxHG-TENhAhXAuA04jtz2DfWXwEhruTWASK_dyBYd78LmmRbV8DIc_5vVO76EnE6zU7JBOy_mR_-gTJN9MPC9hF70dKPc/s320/photo-2.PNG" width="213" /></a></div>
<br />
<br />
A note on the code.<br />
<br />
A stock object is created simply by saying 'stock(symbolstring)' e.g. 'stock("ibm")'. Adding or subtracting assets to a portfolio is done by a regular +, so the line<br />
<br />
_=P+10*s<br />
<br />
simply adds ten shares of s to the portfolio P.<br />
<br />
Dividing a portfolio by a stock give a count of how many shares are in that portfolio.<br />
P/s is the count of the number of share in P.<br />
<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-42188023602569555022013-01-31T14:54:00.000-05:002013-01-31T14:54:16.196-05:00Latest screenshot:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECsQaGUcDRaqD5Avhg4PYEvOlTnglf6RNiR4uZ_Dtw_bpCmGA1j_yIIbFRn0_IIWgdT37tW_4J-JouKmGOjGT_kooBGfxhXeOGk7zFt1nWegzcuCjVtd9UAfAPYojcZ1uPUvzcESQOPti/s1600/photo-3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjECsQaGUcDRaqD5Avhg4PYEvOlTnglf6RNiR4uZ_Dtw_bpCmGA1j_yIIbFRn0_IIWgdT37tW_4J-JouKmGOjGT_kooBGfxhXeOGk7zFt1nWegzcuCjVtd9UAfAPYojcZ1uPUvzcESQOPti/s320/photo-3.PNG" width="213" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-47952812401444789342013-01-27T15:57:00.001-05:002013-01-27T15:57:39.665-05:002012 video showing graphics capabilitiesA video of an early 2012 edition of the program:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Ck3SMXybFZ8?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-62197984077180920612011-10-08T00:22:00.000-04:002011-10-08T00:36:24.583-04:00Images from most recent build<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL8QjOxorr5lt5FM9PW2ocwzkV-o7ly0-3CNOYxClbcVTpgEc_udH8vM0QJcmlCsCAGDnQXq4WxNB352SQVD34583TF4Y-j9NTeB2p4GHuLjIVAs6QrIUSNK2VDf_VNGJaKOFKFg-Vakqn/s1600/IMG_0129.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL8QjOxorr5lt5FM9PW2ocwzkV-o7ly0-3CNOYxClbcVTpgEc_udH8vM0QJcmlCsCAGDnQXq4WxNB352SQVD34583TF4Y-j9NTeB2p4GHuLjIVAs6QrIUSNK2VDf_VNGJaKOFKFg-Vakqn/s320/IMG_0129.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5660975361978731266" /></a><br /><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9LY6KlzfXX0N83iHwkfIIcbsEkjOanPYLAH1q7uUtf3JIDDudfqYtn6vYdSI6FRBWO0vTyROu-Ds2tpbAWjmhnRADlnOZV3I0u4b_JfGZOuA4xd2SXBCN5-ZJvimZG5zSpm2g2G24Hux/s1600/IMG_0169.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9LY6KlzfXX0N83iHwkfIIcbsEkjOanPYLAH1q7uUtf3JIDDudfqYtn6vYdSI6FRBWO0vTyROu-Ds2tpbAWjmhnRADlnOZV3I0u4b_JfGZOuA4xd2SXBCN5-ZJvimZG5zSpm2g2G24Hux/s320/IMG_0169.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5660974046135266418" /></a><br /><br /><br /><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31vCyQa2ZlbzpDOQBwYgBGI6BP59fiIsrfdRzsIVzVluDiIQlPICVZuay81yGaRIDxjmTO5zlKCpGJC68oCXB3mD-FhM2RkzoZe1Z1DKsmIBdXDsmyAk2-9-iR8irFrwJyno0R8Qkfpoj/s1600/IMG_0168.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg31vCyQa2ZlbzpDOQBwYgBGI6BP59fiIsrfdRzsIVzVluDiIQlPICVZuay81yGaRIDxjmTO5zlKCpGJC68oCXB3mD-FhM2RkzoZe1Z1DKsmIBdXDsmyAk2-9-iR8irFrwJyno0R8Qkfpoj/s320/IMG_0168.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5660973886844432834" /></a><br /><br /><br /><br /><br /><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0puaVtY6kM1daUFrAs2V3HXKapgUhvs-DCQ5KxBawTT6RVfaY80GBr6ZR0-DwmyJnLjhW4gr5C14RQVwBy-mIdfI5gEeSCbcEz8_mCCVRJDv1ds2nvoeLAg-XCt5wVYLT-suzh0fWMU2C/s1600/IMG_0160.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 214px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0puaVtY6kM1daUFrAs2V3HXKapgUhvs-DCQ5KxBawTT6RVfaY80GBr6ZR0-DwmyJnLjhW4gr5C14RQVwBy-mIdfI5gEeSCbcEz8_mCCVRJDv1ds2nvoeLAg-XCt5wVYLT-suzh0fWMU2C/s320/IMG_0160.PNG" border="0" alt="" id="BLOGGER_PHOTO_ID_5660973212562538658" /></a><br /><br /><br /></div></div>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-64723564643957373172011-01-23T20:21:00.000-05:002011-01-23T20:23:53.514-05:00Reading Yahoo/Fed data directlyI can now use Lua to read in Federal-H15 data and Yahoo stock data. directly into QuantLib/Lua. I just wish I could read bond data from somewhere :-(Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-49687960020601006312011-01-07T00:04:00.000-05:002011-01-07T00:05:28.464-05:00QuantLib, Lua on iPhone<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/0gupMx5ktZY?hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/0gupMx5ktZY?hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-46037307549187591522011-01-06T23:11:00.000-05:002011-01-06T23:25:21.009-05:00Pricing a bond using QuantLib/LuaHere is an example of pricing a bond using QuantLib/Lua on the iPhone<div><br /></div><div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">--Simple bond pricing</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">--http://tgwena.blogspot.com</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">ql=QuantLib</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">Date=ql.Date</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">local sDD=Date(17,5,1998)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">local eDD=Date(17,5,2001)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">local r=0.04 --interest rate</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">local c=0.06 --coupon</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">ql.Settings_instance():setEvaluationDate(sDD)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">sched=ql.Schedule(sDD,eDD,ql.Period(2),ql.NullCalendar(),ql.Unadjusted,ql.Unadjusted,0,false)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">ufixQ=ql.SimpleQuote(r)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">ufixH=ql.QuoteHandle(ufixQ)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">curve=ql.FlatForward(0,ql.NullCalendar(),ufixH,ql.SimpleDayCounter())</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">flatTS=ql.YieldTermStructureHandle(curve)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">bondEngine=ql.DiscountingBondEngine(flatTS)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">bond=ql.FixedRateBond(0,100,sched,ql.DoubleVector(1,c),ql.SimpleDayCounter(),ql.Unadjusted, 100, sDD)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">bond:setPricingEngine(bondEngine)</span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';"><br /></span></div><div><span class="Apple-style-span" style="font-family:'trebuchet ms';">print(bond:dirtyPrice())</span></div></div><div><br /></div>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-72013624201598613672010-12-05T22:52:00.000-05:002010-12-05T22:54:57.291-05:00A sample Lua/QuantLib programThis example is a rip of the Python Lua example for European options:<div><br /></div><div>It returns the values 0.030342732609191 and 0.030027071770314 respectively<br /><div><br /></div><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">-- Mostly ripped from Python European Example</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">-- makes life a little simpler</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">QL=QuantLib</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">Date=QL.Date</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">tD=Date(15,QuantLib.May,1998)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">sD=Date(17,QuantLib.May,1998)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">QL.Settings_instance():setEvaluationDate(tD)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">print(QL.Settings_instance():getEvaluationDate())</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">riskFreeRate = QL.FlatForward(sD, 0.05, QL.Actual365Fixed())</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">exercise = QL.EuropeanExercise(Date(17,5,1999))</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">payoff = QL.PlainVanillaPayoff(QL.Option_Call, 8.0)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">underlying = QL.SimpleQuote(7.0)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">volatility = QL.BlackConstantVol(tD, QL.TARGET(), 0.10, QL.Actual365Fixed())</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">dividendYield = QL.FlatForward(sD, 0.05, QL.Actual365Fixed())</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">process = QL.BlackScholesMertonProcess(QL.QuoteHandle(underlying),QL.YieldTermStructureHandle(dividendYield),QL.YieldTermStructureHandle(riskFreeRate),QL.BlackVolTermStructureHandle(volatility))</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">option = QL.VanillaOption(payoff, exercise)</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">option:setPricingEngine(QL.AnalyticEuropeanEngine(process))</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">-- Analytic</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">print ("Analytic Price",option:NPV())</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">-- Finite Difference</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">-- method: finite differences</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">timeSteps = 801</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">gridPoints = 800</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">option:setPricingEngine(QL.FDEuropeanEngine(process,timeSteps,gridPoints))</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica">print("finite diff.",option:NPV())</p></div></div>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-63208187503007027132010-10-08T14:20:00.000-04:002010-10-08T14:22:36.985-04:00iPhone QuantLib stuffIs being consolidated at <a href="http://sites.google.com/site/aninvestmentgame/">this website</a><div><br /></div><div>I have done a lot of stuff and just haven't had time to put it all together in one place.</div>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-54393006971190548002010-10-02T01:41:00.000-04:002010-10-02T01:45:33.166-04:00Beyond Lights Out available<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://itunes.apple.com/us/app/t-lights/id394662732?mt=8"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 200px; height: 67px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMy-kpFABp9qBFWJyYtHxAsHar4IO8SgV5pR_zYMVDLar_HGZFAP7IzCBS6NsjCTw9Yr_umhcUmbN5oe5xlMTztrz3T6T0DCYNTSkUfERr7AykEex3XTB1-fJq785fwPUxbHnU19raqGu9/s200/available_on_the_app_store.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5523320139928589474" /></a><a href="http://itunes.apple.com/us/app/t-lights/id394662732?mt=8"><br /></a><br /><br /><p><br /><br /><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/IGdduakQBok?fs=1&hl=en_US"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/IGdduakQBok?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-72682349964326687382010-09-01T23:03:00.000-04:002010-09-01T23:06:34.924-04:00DayCount available on your nearest iTunes store.<div>It's now available at your favorite iTunes store.</div><div><br /></div><a href="http://itunes.apple.com/us/app/daycount-360/id389724680?mt=8"><img style="cursor:pointer; cursor:hand;width: 200px; height: 100px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiupve3oAFr-PpFQQz32Bo_vImWRHJeoO-7hbqpxlyTyqkkRs28Zduox0g-S2aY53r30yLDmUYgJu5nqNZiB0PXSxT4Yrgp0E6Fc76Fi3x0gTT2N-l5ymA-z7zHBBcI2nA2N-ZgFemd2yrG/s320/App_Store_Badge_EN.gif" border="0" alt="" id="BLOGGER_PHOTO_ID_5512146932825938642" /></a>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-81277976145691404772010-08-22T22:22:00.000-04:002010-08-22T22:24:22.566-04:00Daycounter progressI've had a review of my daycounter app. Much has improved and it's much closer to launch. New images at <a href="http://daycountiphone.blogspot.com">http://daycountiphone.blogspot.com</a>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0tag:blogger.com,1999:blog-2953153679759628290.post-64276152164453957792010-07-26T11:35:00.000-04:002010-07-26T11:36:16.474-04:00Daycounter for iPhoneCheck it out at <a href="http://daycountiphone.blogspot.com">daycountiphone</a>Anonymoushttp://www.blogger.com/profile/11692070935845934895noreply@blogger.com0