Upcoming SlideShare
×

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

818
-1

Published on

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 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
818
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
2
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

1. 1. Numerical Development with F# and Excel Adam Mlocek Tomas Petricek
2. 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. 3.  FCell.XlProvider: Type Provider for Excel named ranges  Fmat: F# matrix library  FCell.Series: F# recursive series framework The Toolbox
4. 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. 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. 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. 7.  Create custom menu with button to run the VaR model  Embed F# model and FCell runtime in workbook FCell Demo
1. #### A particular slide catching your eye?

Clipping is a handy way to collect important slides you want to go back to later.