Chris Donnan : Programming – Brooklyn Style
software, trading, family, fun
Posted .net, parallel programming, programming on Sunday, February 17th, 2008.
Linkfest on parallelism in .net land…
Read/ listen to ALL of these….
Microsoft Parallel Extensions to .NET Framework 3.5, December 2007 Community Technology Preview
Joe Duffy on the Task Parallel Library
Introducing F# Asynchronous Workflows
Design: Task Parallel Library explored
Using Parallel Extensions from F#
Burton Smith: On General Purpose Super Computing and the History and Future of Parallelism
The Manycore Shift White Paper
Optimize Managed Code For Multi-Core Machines
Running Queries On Multi-Core Processors
Â
You can leave a response, or trackback from your own site.
Posted algorithmic trading, trading on Saturday, February 16th, 2008.
Several others in blogland are ref’ing this – but it is excellent – so I will too:
There are just tons of interesting stats on electronic trading, multi-asset trading, etc. My favorite excerpt:
Overwhelming sense of expectation of a Single Trading Platform
85% of buy-side respondents expected to be able to use a single platform for all of their institution’s wholesale electronic trading activity. The majority of those respondents (55%) expected this to happen within two years. This perhaps contrasts with the fact that the buyside did not appear to consider “range of products†as such an important factor in the selection of a trading platform.
You can leave a response, or trackback from your own site.
Posted .net, AI/ Machine Learning, c#, programming on Saturday, February 16th, 2008.
I was going over some code from a few years back. I have tons if AI/ datamining, etc code from over the years. I was working on some WPF related UI stuff – and decided to dig out and dust off some of my fuzzy logic code. So – here is the 1st bit of code for NFuzz – a simple fuzzy logic library for .net.
*Quick* Primer on fuzzy logic
The basic idea of fuzzy logic is a simple extension of plain old logical proofs. Take for example:
- true and false = false
- true and true = true
- etc.
These are examples of classical logic – or crisp logic. Now – fuzzy logic is basically that – but with numbers and ‘degrees of trueness/ falseness’.
Here is a coarse example:
- 1-3 = low
- 3-5Â = med
- 5-7 = hi
This might look something like this:
![]()
That is basically ‘crisp’ logic – you can say “is it low?” or “is it high”.
Fuzzy Sets
Here are a few more possibilities – fuzzy sets:
 or
 or
 or even ![]()
Here we have triangle, trapezoid, gaussian and mixed “fuzzy sets”.
Fuzzy Membership Functions
A Fuzzy set is a group of labeled ‘fuzzy membership functions’. Each of the “low, med,etc” items we see above is a fuzzy membership function. These membership functions job is to return a # from 0-1 – the degree of membership to that label in the term set. So if – for example – your “low” triangle membership function is from 0, peaks at 5 and ends at 10, any # that is sent into it will have a ‘degree of membership’. If I send a 11 in, or a 1000, – I will get a zero membership (it is not found in that membership function’s space. If i send a number between 0 and 10 in – I will get a # > 0 <=1. This works the same way for all fuzzy membership functions.
Fuzzy Logic
It starts to get interesting when you add in LOGIC. You can say things like “low or med” or “low and medium” or even things (when you include ‘hedge terms’) like “very high” or “somewhat low”.
The idea with ALL of this is that you can have rules – stated in logical terms – and abstract away from the #s of it all. You can then ‘tune the membership functions’ to fit your domain best. This has proven very useful for trading systems in the past. You can push streams of data into your fuzzy sets and have rules for trading this way. It is applicable to MANY domains…
More to come on all this… For now – here is a quick code snap.
-Chris-
You can leave a response, or trackback from your own site.
Posted Finance, trading on Saturday, February 16th, 2008.
via Big Picture – How Subprime Really Works – hysterical – really.
You can leave a response, or trackback from your own site.
Posted programming on Saturday, February 16th, 2008.
I just love this pic. I think it is the best pic I have taken yet- so here:

I will admit Micah above looks a bit insane in this photo – but it actually captures some of his essence
My MacBook Air has actually shipped
I am very interested in LINQ – but I just could not get too deep without Resharper – thankfully – the 1st (glitchy – yes) build of R#4 is available today.
I have been working on some WPF fuzzy logic stuff. I have also been doing it for Ruby just to see how it looks there. I have a post brewin’…
Long weekends are good !
-Chris
You can leave a response, or trackback from your own site.
Posted programming on Friday, February 15th, 2008.
I realized that I am too used to resharper to program without it. I have been doing minor LINQ stuff the past few days – and realized I can’t function without resharper!!!!
Resharper 4 EAP upÂ
Thankfully -R#4 is comin’.
Chris
You can leave a response, or trackback from your own site.
Posted Family on Saturday, February 9th, 2008.
This is really off topic, but it is stuff on my mind.
1st – “Say Yes”
When I had just had my 1st son, Gabriel, my Mom (whom I think was a good parent and all) gave me a piece of advice – that I liked, and try to follow. Her basic advice was “say yes to them whenever possible, there will be plenty of ‘nos’”. So – with small children at least – this is an interesting challenge. I have found myself on many ocassions battling back and forth with my wonderful, brilliant and willful son Gabe (Micah is younger and generally more compliant – so not so much him yet). In any case – yesterday was a somewhat tough day (more on that next) and I did not see Gabe much at all. In the late afternoon when we all finally were at peace at home, I wanted to take Gabe out for some 1×1 time. Since he just got his “orange stripe belt” from Karate – our tradition is to go to J&R and get a (acceptable for small children) video game for his GameBoy (I know – oldschool – he loves it). I also took the opportunity to see the MacBook Air
.
Anyhow - the point soon… So – when we left – I made sure to tell him that this was his time and that there were now “no rules” – and that he just had the uber-yes – whatever he wanted right now was going to be OK (within reason, but we did not have to say that). In any case – it was amazing just to see how his demeanor lit up. In general life – there ARE lots of rules for a 5 year old boy. “Don’t talk about buts all day”, “stop punching your brother”, “please eat anything besides the junk you are begging me for”, etc, etc. It can cause tension between us as he is willful and it is a parents job to help their kids learn appropriate boundaries. In any case – saying yes to Gabe yesterday was rewarding. We simply went out together for ~2 hours – he smiled, we laughed and talked – and he did not ask for anything unreasonable. He is a great kid
 Â

Â
Â
Adenoids and Ear Tubes
So I mentioned that yesterday was a tough day. Micah – my other great kid had some minor surgical business yesterday. I say minor with some difficulty – because anytime your kid goes under – it is scary! It turns out that these surgical outpatient procedures are VERY common.
Adenoids you say – what the (*&^# is an adenoid?

There you are – it is a thing in your head, behind your nose – near your ears. In Micah’s case – they were inflamed since he was small – and it made it so he could NEVER breathe out of his little nose. Not only this – but it messed with his ears. As it goes – he had some ‘glue’ in his ears that was starting to mess with his hearing. So – they put these tiny, tiny tubes inside his middle ear! You can’t see them – they are really inside, but they help drain the gluey junk from his middle ear (gross right!). Anyhow – these ear tubes went in – and the adenoids were deleted (some odd, non-bloody erasure of adenoids – I don’t really get it).
What this meant for us: We went in @ 730 AM, wiated, went to the pediatric waiting area were we put him in some partial hospital gowns (he began to freak out here – he is scared of doctors after too many ENT specialist visits where they shove a tube up his nose). He then freaked out when they took his temperature under his arm. Then (thankfully) they came and gave him a valume like drink that made him REALLY happy – sorta drunk, relaxed. He was singing, bopping around and generally enjoying life… for 10 minutes till the doctor (Dr Richard Rosenfeld who we love and is seemly regarded as tje best ENT on the Tri-state area) came to get him. That was @930 AM.
We then went to wait till 1000 AM – whe Dr Rosenfeld came to get us and let us know all was well, done, happy, etc. Alas – this is where the fun began for us. You see – children wake up ‘freaked out’ from anesthesia – really they do. We saw some other kids freak out pretty well. Micah – being generally passionate – elected to freak out for 150-200% of the normal freak out time – some ~50 minutes of raw, ugly, painful screaming, writhing, pitching about, etc. Essentially – he was all ‘wired up’ with an IV, heart monitors, thermometer etc. He really was very unhappy. Shannon and I had to hold him, console him, talk him down – and generally let him wear himself out. It sucked. It was not good.
From there – we let him rest for 1 hour-Â then went back to pediatric wiating for another hour. He freaked out only on and off till we went home. Once home – he was much better – just like a kid with a minor flu.
The surgrey was a success – he is fine. This was minor as surgical procedures go – so my heart goes out to any parent who has to watch their kids go through serious medical procedures.
Anyhow – here he is – last weekend @ grandmas on his toy mortorcycle:

Â
I love my boys:
Chris
You can leave a response, or trackback from your own site.
Posted deals, mac on Saturday, February 9th, 2008.
Well – I am still waiting! Why am I posting? Well – a few things happened – 1st – I cancelled, and re-ordered my MBA (yeah – that is the lingo MBA). Why did I do this? Well – a friend and collegue of mine said to me “hey Chris – did you know we get Apple corporate discount? You should have used that for your MBA!”. I said hmm… I logged on – checked out my discount – and it was a ~$150 savings. Nice – so – since my order was still “not shipped” from Apple – I cancelled it, and re-ordered it (same specs etc) thus – saving $150. That said – I would have had it by now if I had not done this
.
More … That same friend and collegue came to me the other day and said “Hey – J&R just got a demo MBA, you should go check it out, I saw it – and I did not think it was ’all that’”. Also - I have been debating the idea of getting a MacBook Pro in stead (you know, more beef for the bucks, etc, etc). So – I went to J&R and saw, touched, compared, etc. Needless to say – it IS just what I want. I STILL LOVE my Lenovo ThinkPad X60 Tablet. I LOVE the smallness factor – it REALLY matters to me. I WAS impressed – I will continue patiently waiting. As of now – I will be waiting till the 22nd or so till I get my MBA
So – on goes the saga – I want my (discounted) MacBook Air!
-Chris
You can leave a response, or trackback from your own site.
Posted Derivatives, Finance, math, trading on Sunday, February 3rd, 2008.
So – I an effort to get back in the game with my maths, I have ordered a series of books and I am planning on weekly study time. Here is my basic list:
Calculus:
• Functions and limits
• Differentiation and integration
• Taylor series
• Complex numbers
• Functions of several variables
• Gamma and beta function
• Numerical integration
Differential Equations:
• First order equations
• Second and higher order equations
• Partial Differential Equations
• Diffusion equation
• Black-Scholes equation
Linear Algebra:
• Matrices and Vectors
• Systems of linear equations
• Eigenvalues and eigenvectors
• Vector spaces
Elementary Probability Theory:
• Discrete and continuous distributions
• Simple moments (mean and variance)
• Higher moments (skew and kurtosis)
• Important distributions
• Correlation
• Central Limit Theorem
Basic Stochastic Calculus:
• Random walks/SDE
• Brownian motion and Itô’s lemma
• Basic Monte Carlo
This is taken from the Wilmott’s Maths Primer. I have been considering taking the Wilmott/ 7City CQF. I am obviously interested in continued automated trading efforts. I am relatively strong with the probability/ statistics driven work – I have done the most professionally there. I am also obviously interested in the business of trading, including more and more derivative products. I have been able to work with quants in the past to implement automated systems. The way I figure it – the more I can work directly with quants, the closer I am to doing more and more of quantitatively minded fully automated real time trading.
I will let you know how it goes – my continued maths studies.
-Chris-
You can leave a response, or trackback from your own site.
