Object-Oriented Portfolio Management

It has been our busiest month yet, as evidenced by the lack of blog posts. We've been preparing the code drop for our Developer Release, which involves tying together all the different modules we've been working on. While the rest of the team toils, I'm going to talk about one of the bigger issues we've been dealing with over the past few months--data persistence, which is developer-speak for "saving information in the database".

Designing object-oriented software yields almost total control over modeling business concepts. Traditional database-driven design may have a Transaction table that holds all transactions, each with identical fields. An object-oriented approach allows the creation of separate objects for each type of transaction, endowing each transaction with the properties and functionality that make it unique. Why have a Share amount in a Dividend? Dividends don't actually have shares, after all. With an object-oriented approach, Dividends not only remain share-free, but also add other unique fields, like PaidDate and ExDate, and specific functionality to utilize them.

Sounds great, right? It is. Much of our next-gen functionality is dependent on FinFolio using a modern object framework. Time-sensitive ownership, n-level account/portfolio trees, the extensible plug-in framework, alerts, and even on-the-fly cost allocation is all dependent on a pervasive object model.

Topics: Development

Milestone - Cost

We finally locked down the cost module last week--our biggest headache so far. As you enter transactions, whether via import or data entry, FinFolio allocates your tax lots using your specified allocation.

It does LIFO, FIFO, Highest, Lowest, Average, and Specific Lot. A neat thing about Specific Lot--you set the top-level allocation type to Specific Lot, then you can set the lot type on individual transactions to LIFO/FIFO/Highest/Lowest. This means you can do fine-grained lot allocation without the headache of having to calculate the lots yourself. (and you can still allocate them manually)

We have test cases for some security types, including short positions and options. Those were very difficult to do in Techfi's software so we made sure they all worked automatically this time around. We're planning on fleshing out any remaining security types before the Developer Preview.

The tax module automatically detects and handles wash sales, qualified dividends, and constructive sales. It tracks not only long term and short term gain, but also gain from collectibles, qualified small business stock, SSBIC, Section 1256 gain, and un-recaptured 1250 gain. It will automatically analyze qualified dividends, correctly treating non-qualified dividends as ordinary income rather than short term capital gain.

Topics: Development

Milestone - Rate of Return

We needed something simple to flesh out how the Calculation structure works. I've written rates of return so often I could almost do it in my sleep. It took about a week, with much of it being spent perusing my library of rate of return books, looking for new formula tricks.

This time, I used Mathematica to take the iterative guessing process out to a 6th degree polynomial. I don't think it's any more accurate but the code certainly looks impressive--pages of nothing but complicated, error-prone formulas, although there shouldn't be any errors since Mathematica did all the work. I cut my teeth at dbCAMS by debugging and rewriting their IRR formula when I was still on the support team. And I've rewritten it from scratch several times at other companies. The first time I wrote it completely from scratch it took me more than a month to perfect it, and it involved solving polynomials by hand. So I'm pretty pleased at how quickly we were able to do it this time.

Topics: Development

FinFolio is Hiring

We've been waiting for the development framework to be completed before adding staff. It's getting close and should be solid enough by May or June. So we're starting our search for two Denver-based positions. All of the positions come with stock, salary based on experience, and all the fun and excitement of working with a cutting-edge, fully funded startup company.

Topics: Hiring Development