The code snippet is capable of calculating historical volatility using Close Price, High Low Price and Close High Low Price methods. Simply provide symbol, start date and end date of the specific volatility method and it extracts the market data from the yahoo service and calculated the volatility. open System open System.IO open System.Xml open… Continue reading Historical Volatility
Functional programming is not a silver bullet, but learning it will indeed add to the knowledge of every software engineer about solving problem in different a way. One can always implement functional style of programming in any imperative language they use. Advantages: For analysis of mathematical problem that requires human analysts, it is possible to represent… Continue reading Why functional programming?
i found this really gr8 blog post and want to share. http://www.gotnet.biz/Blog/post/Why-Learning-FSharp-Is-So-Difficult.aspx thanks to Kevin Hazzard for wonderful post.
So i found this great post by doug finke on his blog where he has show implementation for retrieving data from usaspending website using Power Shell and LinqToXml here are my implmentation on C# and F# here is F# implementation.
C# code for functional fibonnaci numbers Func<int, int> fib = null; fib = n => n > 1 ? fib(n – 1) + fib(n – 2) : n; Okay so you guys would think why would i declare the delegate in one line and instantiate in the next. The reason is that if you do… Continue reading Functional Fibonnaci series in C#
Finally i have decided to write on how we can achieve funcational programming in C#. Lets start with defining a function Math: f(x) = x C#: Action<int> f = x =>x; Math : f(x) = 6x + 2 C#: Func<int,int> f = x=> 6*x + 2; Math: f(x,y) = 2x+ 3y C#: Func<int,int,int> f =… Continue reading C# functional programming
In functional programming, a monad is a kind of abstract data type used to represent computations (instead of data in the domain model). Programs written in functional style can make use of monads to structure procedures that include sequenced operations, or to define arbitrary control flows (like handling concurrency, continuations, or exceptions). Formally, a monad… Continue reading Monads Part 3