SHOP.AGUARDIENTECLOTHING.COM Books > Finance > Clojure for Finance by Timothy Washington

Clojure for Finance by Timothy Washington

By Timothy Washington

Clojure is a dynamic programming language with an emphasis on useful programming. Clojure is definitely suited for monetary modeling because it is a sensible programming language. Such languages aid builders paintings with high-level mathematical abstractions with no need to enforce low-level code that handles the mathematics operations.

Starting with the significance of representing information and calculations successfully, this e-book will take you all of the technique to being efficient in monetary analytics and development monetary applications.

First, we introduce the notions of computation and finance, so as to assist you comprehend Clojure's software to resolve real-world difficulties in lots of domain names, particularly finance. subsequent, we'll enable you increase the simple-moving-average functionality through the use of the extra complex partition Clojure information transformation functionality. This functionality, besides others, may be used to calculate and manage information.

Show description

Read or Download Clojure for Finance PDF

Similar finance books

Your Money and Your Brain: How the New Science of Neuroeconomics Can Help Make You Rich

What occurs inside of our brains once we take into consideration cash? rather a lot, really, and a few of it isn't sturdy for our monetary well-being. on your funds and Your mind, Jason Zweig explains why clever humans make silly monetary judgements -- and what they could do to prevent those blunders. Zweig, a veteran monetary journalist, attracts at the newest learn in neuroeconomics, a desirable new self-discipline that mixes psychology, neuroscience, and economics to raised comprehend monetary determination making.

Breakout Nations

To spot the commercial stars of the long run we should always abandon the behavior of extrapolating from the new previous and lumping wildly diversified international locations jointly. we have to keep in mind that sustained monetary good fortune is an extraordinary phenomenon. After years of fast progress, the main celebrated rising markets―Brazil, Russia, India, and China―are approximately to decelerate.

The Most Dangerous Trade: How Short Sellers Uncover Fraud, Keep Markets Honest, and Make and Lose Billions

How brief make the most of failures that afflict members, markets, and international locations

The most threatening exchange serves up stories from the darkish facet of the area industry to bare how investors cash in on the failure and, usually, the bankruptcy of others. during this booklet Richard Teitelbaum profiles greater than a dozen brief to bare how they hire the strategies, techniques, and diverse kinds to 0 in on their aim, get the wanted financing, and notice their funding via to its final conclusion.

The brief dealers profiled will comprise tales of either their winning investments in addition to their disastrous ventures. The ebook will research different types, techniques, and strategies applied, taking a look at how every one brief vendor researches his or her ambitions, obtains financing, places on a alternate, and sees the funding via to fruition—or failure. With the allure of a well-written experience novel, the main harmful exchange unearths how those traders search exposure to aid force down a inventory and exhibits the usually sour and arguable battles that take place.

• contains profiles of well-know brief dealers similar to Jim Chanos, Steve Eisman, Manuel Ascencio, Doug Kass, and plenty of more
• detect how brief make the "puts" that lead them to billions
• discover the quick promoting controversies that make headlines
• Written via award-winning journalist Richard Teitelbaum

Discover what motivates traders who guess opposed to the inventory industry and the way they typically cash in on the distress of others.

Stochastic Optimization Models in Finance

A reprint of 1 of the vintage volumes on portfolio conception and funding, this e-book has been utilized by the major professors at universities reminiscent of Stanford, Berkeley, and Carnegie-Mellon. It comprises 5 components, each one with a assessment of the literature and approximately a hundred and fifty pages of computational and assessment routines and additional in-depth, hard difficulties.

Extra resources for Clojure for Finance

Example text

Feel free to play around with the data and share your results. We've taken pains to first understand what a stream of stock price data may look like. We then applied some core functional programming features that Clojure provides to transform data into the stock price shape we desire. This is an important point to note for any programming language. It should be a tool that empowers you to shape your data as your needs develop. In the next chapter, we're going to continue this lesson, paying close attention to some useful ideas on how to fully capture and represent our data.

This is what I'll describe as fully perceiving a problem. Let's take Clojure data structures, functions, and FP approaches as a way of representing our problem and solving it. We ultimately need to gauge how close our perception and representations are to actual stock price data. However, for now, we have an infinite stream of price and time points. Apart from this stream of data, we want to calculate a moving average of prices. So, an average is just the sum of a collection of things divided by the length of the collection.

The result is then in the form of a list of maps with the :time and :price entries, for example, ({:time x :price y}). As such, we can simplify this function to just one map call over both collections and return a map with both values. core) (defn generate-prices [lower-bound upper-bound] (filter (fn [x] (>= x lower-bound)) (repeatedly (fn [] (rand upper-bound))))) (defn generate-timeseries [pricelist] (map (fn [x y] {:time x :price y}) (iterate inc 0) pricelist)) Then, in your REPL, you can require the namespace and generate a time series (see the following code).

Download PDF sample

Rated 4.84 of 5 – based on 34 votes