Your SlideShare is downloading. ×
Progressive f# tutorials nyc tomas petricek & adam mlocek on f cell numerical development in excel w f#
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Progressive f# tutorials nyc tomas petricek & adam mlocek on f cell numerical development in excel w f#

616
views

Published on

FCell: Numerical Development in Excel w/ F# …

FCell: Numerical Development in Excel w/ F#
Are your Excel Add-Ins difficult to develop, test and deploy? Frustrated with C++, VSTO or VBA based solutions? Or maybe you would simply love to run interactive F# scripts within Excel? Come and learn about FCell Add-In, an integrated F# development platform embedded in Excel. Using Fmat, an open source F# math library, we will implement simple numerical models in Excel. You will learn how to create Excel User Defined Functions in F# and how to access spreadsheet data in your F# scripts via Excel Type Provider for Named Ranges. Only Excel 2007 or later required.

Published in: Technology, Art & Photos

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
616
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Numerical Development with F# and Excel Adam Mlocek Tomas Petricek
  • 2.  Download and unzip: http://statfactory.co.uk/Tutorial.zip  Use VS2012 or install Tsunami F# IDE: www.tsunami.io  Install FCell 2.0 beta (optional): http://statfactory.co.uk/FCell20_32bitExcel.msi http://statfactory.co.uk/FCell20_64bitExcel.msi Setup
  • 3.  FCell.XlProvider: Type Provider for Excel named ranges  Fmat: F# matrix library  FCell.Series: F# recursive series framework The Toolbox
  • 4.  Open Tutorial.xlsm and Intro.fsx  Generate random normal : normRnd  Use (!!) operator for casting  Transpose matrix  Concatenate matrices vertically  Slice matrix  Calculate cov, mean and quantiles  Calculate inverse normal cdf Warm up
  • 5.  Calculate Fibonacci: f(n) = f(n-1)+f(n-2)  Calculate cumsum of 0,1,2…  Simulate Wiener process: W(t+dt) = W(t) + dt * Z, Z~N(0,1)  Simulate Geometric Brownian Motion process S(t+dt) = S(t)+S(t)*μ*dt+S(t)*σ*dt*Z, Z~N(0,1) Exercise 1: Series
  • 6.  Portfolio with 3 stocks: AAPL, MSFT and GOOG  Value V, allocated with weights w  ~500 daily historical prices  Calculate daily Log losses: L  Historical VaR(α=95%)=quantile(V*w*L.T)  Assume L~N(mean, cov)  Calculate normal VaR analytically Exercise 2: Portfolio VaR
  • 7.  Create custom menu with button to run the VaR model  Embed F# model and FCell runtime in workbook FCell Demo

×