Better HN
topnewbestaskshowjobs
Log inSign up

kyleloomis

38 karma · joined Dec 3, 2019 (6y ago) · 12 submissions

Submissions

1.

Serializing SQL: Building Serializable Data Classes in Kotlin(kyleloomis.com ↗)

2 points · by kyleloomis · 2y ago · discuss

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Not yet, I will work to add this soon.

comment 2y ago · link · parent

Likely...

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Finstruments introductory article: https://kyleloomis.com/articles/financial-instrument-library

12.

Show HN: Finstruments - Financial instrument library built with Python(github.com ↗)

72 points · by kyleloomis · 2y ago · 21 comments