Hacker Newsnew | past | comments | ask | show | jobs | submit | kyleloomis's commentslogin

Finstruments is an instrument definition library, meaning that you can build the specifications of an instrument. Currently, this library is primarily useful for serialization and deserialization to and from JSON, but it can also be used for backtesting, option payoffs, tracking portfolio P&L, risk management, API integration, and document storage.

Regarding the Portfolio class, I opted to distinguish trades from positions. This is useful for tracking and organizational purposes. For example, if you enter into a straddle, it's useful to combine the put and call into one "trade" instead of just a bunch of random positions.

This is a very early work-in-progress, so I would suggest checking back in over the coming weeks for additional instruments and usage details.


Thanks for sharing. Unfortunately doesn't look to support Python natively, and it looks quite complex for my purposes of instrument definitions, but it seems useful as a reference point.


Thanks for sharing. Your library seems to be a bit more extensive, including not only definitions but also modeling. Might be useful as a reference point if I integrate other functionality such as pricing.


Not yet, I will work to add this soon.


Likely...


QuantLib is an bloated library built in C++ and ported over to Python. The design is unintuitive, lacks modularity, and employs a number of hacks, such as locks. My goal is to build an intuitive, simple, and modular alternative for users that care more about the coding experience.



The scrolling animation / progress indicator thingy on your blog seems broken by the way. It quickly moves out of the visible view on a pretty normal setup (24" FHD screen, Linux, Firefox).


Thanks for the note! I removed this for now... will fix later.


I'd have to use it first to comment on it, but thanks so far. Article makes a good impression.


Let me know your thoughts and how it could be improved.


Do you have any recommendations on how to store financial data?


Financial data, as in a time series of prices? It really depends on your budget, desired overhead, and amount of data. Some funds store data in flat files (broken down by date, instrument, ticker, etc), others use time series databases, such as ClickHouse or Kdb+. Using flat files is probably the simplest and most cost effective while still enabling you to store a massive amount of data, but using a database obviously enables querying and analytics.


Thanks


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: