Recent Posts

Thursday, October 13, 2016

Launching Open Source Code Libraries

Chart: Bond Price Figure Generated by Python Libraries
Figure generated by Python library code
I have created a basic fixed income pricing package in the Python programming language -- the "simplepricers" package, available at Github: . The code is open source, but the package is now extremely small -- so far, I have spent a lot of time developing my work flow. This package will be used to do fixed income analysis in my books -- and readers will be able to use the source code to replicate the results. For those of you with an interest in economics, I want to package my Stock-Flow Consistent model code in another open source library.


  • Python 3.x [Absolutely required!] I developing on machines with versions 3.3, 3.4, and 3.5 of Python. If you wanted to try it on Python 2.X, you might be able to get much of the code to work. (The print syntax has changed.)
  • Git. [Extremely useful]. The Git source control system is the most natural way of working with this package. Once installed, you can work with a copy of the code package ("clone the repository" in Git-speak). (The Subversion source control system can link to Github as well.) If you do not want to install Git, you can download the source files in a zip file from the GitHub site.
  • Python Library Matplotlib [Useful for examples]. The matplotlib package was used to generate the figure above. Matplotlib has a lot of useful stuff for this type of work, but it has a lot of dependencies. (My first attempts to install failed on various computers.) You can run my example code without matplotlib, but you will not see the figure. If you use another plotting package, you can substitute matplotlib easily.
  • PyCharm. [Useful.] This is an integrated development environment for Python; very useful. There is a free community edition, and a paid professional version.
  • Knowledge of Python, or at least a "learn to program Python" book.
I have created a new blog - where I will stick things like installation instructions. That site is expected more to be a set of fixed resource pages than a blog. It might migrate to a sub-domain of

And for those who want a more lighthearted approach to Python, I have started working on a "4X" strategy game ("eXplore, eXpand, eXploit, and eXterminate") -

At present, it is not too much of a game - you can watch the AI players try to take over the galaxy. That program uses version 2.7 of Python, and the code is frankly a mess.

Future Developments

I plan to slowly add functionality to the "simplepricers" package as I create examples to illustrate points in articles. A lot of it will be primers, but also topical comments.

Although the final editing process for "Abolish Money!" may take a bit longer, I am starting to think about my next projects. One likely possibility will involve me cleaning up my existing Stock-Flow Consistent model code, and using it to illustrate concepts.

Concluding Remarks

If you are already familiar with Python and git, accessing the code will be straightforward. Otherwise, you will need work on their installation, and how to use them. There is a lot of excellent documentation available for them on the internet; I will put some pointers on the other site.

(c) Brian Romanchuk 2016

No comments:

Post a Comment

Note: Posts may be moderated, and there may be a considerable delay before they appear.

Although I welcome people who disagree with me, please be civil.

Please note that my spam comment filter appears to dislike long "anonymous" posts.

Note: if you want to post comments from Apple devices (iPhone, iPad), you apparently need to turn off "prevent cross-site tracking" in Safari privacy settings. (The reason presumably is that another URL handles comments, and so the user session needs to be preserved when redirected to that site. I don't like this, but this is not enough to make me switch my hosting service.)