HNHacker News
TopNewBestAskShowJobs

kyleloomis

38 karma · joined December 3, 2019

submissionscomments
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
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.

kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
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.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
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.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
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.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
Not yet, I will work to add this soon.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
Likely...
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
Let me know your thoughts and how it could be improved.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
Thanks for the note! I removed this for now... will fix later.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
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.
kyleloomis··on Show HN: Finstruments - Financial instrument library built with Python
Finstruments introductory article: https://kyleloomis.com/articles/financial-instrument-library