45 ms·
An oral history of Bank Python
- timkpaine 5y agoThere is a great talk on this as well: https://youtu.be/M9o9SF5-Pzw https://youtu.be/M9o9SF5-Pzw
- tstordyallison 5y agoI was waiting to see when someone would link to this :)
- viksit 5y agoSomehow reading this article really made me think of lisp and some old jane street and k lang articles here on hn over the years. I wonder if it’s the composability or the centralization?
- rich_sasha 5y agoCompared to one major IB bank Python system, this is all extremely clean and neat. Consider a Python API that is a thin wrapper on COM calls intended to be used from Excel. Want to request some data? Fill in a 2D virtual Excel table. Want to pull some data? Query it and parse a text-dump of a table excerpt (remembering to parse #NA! Etc as nans). Want to automate a job? Enter it as a new row to a global spreadsheet. And for Gods sake, do NOT edit any of the other rows, lest the whole house go down in flames!!!
- sfgweilr4f 5y agoOr they could use instead use CSVs. What could possibly go wrong?
- jeffrallen 5y agoEverything is fine, as long as no Americans come and write 1,000 where obviously they should have written 1000 or 1'000. /s
- deleted 5y ago[deleted]
- blitzar 5y agoOr some american writes the date somewhere. edit: /s we love you american colleagues,
- p_l 5y agoI can confirm that, in a non-bank financial institution, date formats involved with Excel->CSV->XML->Certain (shit) magic application were considerable pain point :|
- simonh 5y agoWorking with and for Americans is why I always use ISO year-month-day format.
- girvo 5y agoThat, and I like how they neatly sort.
- int_19h 5y agoOr those pesky Europeans writing 12,34 when they obviously meant 12.34!
- zzzeek 5y agothis is the approach I'm familiar with, but back when I did it in Perl (yes Win32 perl with COM bindings) and Java (we wrote native Java plugins to do COM to Excel). all the important stuff is Excel VBA code that they spent years developing and can never replace, so any front end type of thing had to somehow get back to the Excel models. We eventually did rewrite the Excel models in Java, released something, and then the whole project probably got cancelled or something, 9/11 happened a few years later and the whole building in which all this code was written had to be demolished.
- mst 5y agoI remember back in 2000 converting the windows line of business app team at $ISP (I was mostly on the provisioning automation side) over to using a COM component called JendaRex which wrapped the perl VM just to expose the regexp engine. This basically came about after the Nth time they asked for regexp help and I had a trivial solution that didn't work in whatever native implementation they were using and I basically gave them a choice between JendaRex and "not having me debugging their regexps anymore". They unanimously chose JendaRex and everybody ended up happier as a result.
- Thorrez 5y agoDoesn't seem that strange compared to K[1] or Q[2], which are used by Wall Street banks. K encourages you to use single-letter variables and bunch your code up as tight as possible into long lines. Here's an example: [3]. Interestingly, their Github repo has some K-inspired C[4], Java[5], C#[6], and Javascript[7]. [1] https://en.wikipedia.org/wiki/K_(programming_language) https://en.wikipedia.org/wiki/K_(programming_language) [2] https://en.wikipedia.org/wiki/Q_(programming_language_from_Kx_Systems) https://en.wikipedia.org/wiki/Q_(programming_language_from_K... [3] https://github.com/KxSystems/kdb/blob/master/holiday.q https://github.com/KxSystems/kdb/blob/master/holiday.q [4] https://github.com/KxSystems/kdb/blob/master/c/c/odbc.c https://github.com/KxSystems/kdb/blob/master/c/c/odbc.c [5] https://github.com/KxSystems/kdb/blob/master/c/jdbc.java https://github.com/KxSystems/kdb/blob/master/c/jdbc.java [6] https://github.com/KxSystems/kdb/blob/master/c/c.cs https://github.com/KxSystems/kdb/blob/master/c/c.cs [7] https://github.com/KxSystems/kdb/blob/master/c/c.js https://github.com/KxSystems/kdb/blob/master/c/c.js
- smsm42 5y agoThank you. Now when I'm thinking some code I have to untangle is bad, I'd always remind myself "at least it's not K-inspired C"...
- grayrest 5y agoThis took me a while to figure out but K/APL code is built on a different value system than most software. Specifically, the goal is to be able to see and operate on the entire program at once. Obviously this only works for programs up to a certain size but that size is larger than you'd expect when abstractions, variable names, and general legibility are sacrificed. I wouldn't write code this way but I can see how someone would find it valuable.
- trenchgun 5y agoVery interesting. I am feeling the urge to learn array processing languages. There is something very tempting.
- 5y ago
- sfgweilr4f 5y agoI can see the benefits of this collection of tools within an all-in-one monolith. Ease of deployment is a big benefit. I can also see the costs. As a stack its probably better in some ways than how a lot of other businesses operate as well as worse. There's probably a lot both ways. The mainframe mindset might be a factor here as well. The giant mainframe where all the magic happens is still a thing to behold and this is definitely part of banking's history and present. Mainframes are beasts and are still far from any kind of obsolescence. A monolithic Bank Python with a standardised set of libraries etc would slot right in to that mindset and way of thinking. The part about programming languages frequently not having tables is interesting. The closest as mentioned is the hash, but you lose so much in that abstraction eg the relational aspects. The counter argument then becomes the obvious: why aren't you using a database library, or in a pinch, sqlite? Rightly so. Why would you add relational tables to python rather than have a generic python database spec or a collection of database connector libraries. Databases are separate and large projects in themselves. I'd still be overly disturbed if they were running some old python 2.5 or similar. Just saying. That would be a source of pity.
- lmm 5y ago> The part about programming languages frequently not having tables is interesting. The closest as mentioned is the hash, but you lose so much in that abstraction eg the relational aspects. The counter argument then becomes the obvious: why aren't you using a database library, or in a pinch, sqlite? Rightly so. Why would you add relational tables to python rather than have a generic python database spec or a collection of database connector libraries. Databases are separate and large projects in themselves. The separate datastore is the problem to be solved here - databases, especially relational databases, are extremely poorly integrated into programming languages and this makes it really painful to develop anything that uses them. You can just about use them as a place to dump serialized data to and from (not suitable for large systems because they're not properly distributed), but if you actually want to operate on data you need it to be in memory where you're running the code and you want it to be tightly integrated with your language and IDE and so on. (It's not even the main benefit, but just as an example of that kind of integration, when you're querying large datasets Minerva works a bit like Hadoop in that it will ship your code to where the data is and run it there)
- throwawayQuartz 5y agoSounds like the Quartz platform at Bank of America. When I interviewed with that team they joyfully espoused the virtues of their Principal Engineer who quote, “created the database software from scratch!” Edit: For the record, I implement third-party vendor Excel functions (DLLs written in C++) in C# and it’s a great way to send useless processes to the shadow realm.
- acosmism 5y agosounds like a company dealing with ..
- tbojanin 5y agoSounds like it could be JPM's 'Athena' platform? context: https://www.techrepublic.com/article/jpmorgans-athena-has-35-million-lines-of-python-code-and-wont-be-updated-to-python-3-in-time/ https://www.techrepublic.com/article/jpmorgans-athena-has-35...
- curiousgal 5y agoThey are all similar but in this particular case this is definitely BAML's Quartz.
- simonh 5y agoI think Minerva is clearly a reference to Athena.
- curiousgal 5y agoCould be a misdirection because all of the rest fits Quartz to a tee. The Quartz database is called Sandra (referred to as Barbara here). The Quartz directed acyclic graph is called Dag (referred to as Dagger here) The Quartz job runner is called Bob (referred to as Walpole here which is a reference to Robert Warpole whose shortname is..Bob) These and the horrible proprietary IDE make it obvious which particular system he's describing.
- simonh 5y agoI think Athena has equivalents to all of these but I don't know what they're called. I only know Qz.
- le-chiffre 5y agoThe Athena database is Hydra; The Athena graph is Pixie; The Athena job runner is also Bob
- 5y ago
- benjaminwootton 5y agoThis pattern in large part came from SecDB at Goldman, and then a few people who moved to moved to JPMC and BAML. Dependency graphs are an elegant solution to risk management and pricing etc. There’s a reason this approach works in IBanks. Check out Beacon.io which is the a SaaS implementation from the same team.
- lucozade 5y ago> Dependency graphs are an elegant solution to risk management and pricing etc. Dependency graphs are not a solution to risk and pricing. They are, in certain circumstances, a very useful tool. That's all. They also scale notoriously painfully. Putting a dependency graph as a mandatory component in your risk system was one of the worst technical decisions I've come across (and I've been doing this lark a long time).
- goldenkey 5y agoWouldn't an observer pattern work better? The graph itself could even be used to instantiate subscriptions in a pub/sub system where changes in underlying pricing could be dealt with via an event queue. Compaction and debouncing could be applied on top of the queue to avoid lots and lots of redundant execution.
- lucozade 5y ago> Wouldn't an observer pattern work better? Better as a solution to what problem? In some cases a dependency graph is an excellent solution. In some cases it's not. In some cases it's fine for small graphs but scales poorly as it can be very hard to reason about (as attested by pretty much anyone who's supported a really big spreadsheet). But that's the point; it's a really useful tool. Sometimes.
- cstross 5y agoThis immediately sprang out at me: > Investment banks have a one-way approach to open source software: (some of) it can come in, but none of it can go out. I wonder how well this plays with the various open source software licenses?
- freeone3000 5y agoQuite well. You are under no obligation to commit back your changes under any OSI license. The old Sun CDDL required it, and was denied OSI "open sourceness" as a result.
- seanhunter 5y agoThat's actually an unfortunate side-effect of banks having weird requirements. When I was at GS we had this enormous source repo built on CVS. So we made improvements to CVS to try to make this more manageable . For example because branching in CVS absolutely sucks we had to use tags (rather than branches) to identify releases. This meant you end up with lots of tags and when you look at them it's really hard to find (visually) whether code has a particular tag. So we patched CVS to sort the tags alphabetically. We tried to upstream this but the CVS devs didn't want to know. So we had to maintain it. Likewise a bunch of fixes to the timezone handling code that iirc glibc simply wouldn't upstream so we had to maintain even though they were bugfixes. We did used to upstream everything we could and I think the situation is improving.
- lozenge 5y agoMost licenses just require your users to have access to the source code. As all the users are bank employees, this is usually easily achieved. If the license is violated it's only by accidental oversight. Pretty much everything described is a Python library not a change in the Python interpreter so can be under a proprietary license. The spirit of open source is a different matter.
- simonh 5y agoAs I understand it from a legal point of view the user in this case is the bank, not individual employees running it on the bank's behalf, and the bank already has the code so it's a non-issue. I know some people think this is contrary to the spirit of open source, but it isn't. One of the goals of open source is so that users can customise the code to their specific use case, with no obligation to share. That's all the banks are doing. They have the same rights as any other user.
- nraynaud 5y agoit has a bit of a smalltalk flavor, where the runtime is a memory image, with objects and data in a giant jumble.
- p_l 5y agoThere's one smalltalk vendor whose main product is an object-oriented database that is also a smalltalk instance (and you use other smalltalks as IDEs to it). GemStone/S
- twic 5y agoThere was also a giant investment bank system written in Smalltalk, so that may be a direct influence: http://www.esug.org/data/ESUG2004/ValueOfSmalltalk.pdf http://www.esug.org/data/ESUG2004/ValueOfSmalltalk.pdf
- musiciangames 5y agoCan anyone confirm whether JP Morgan were able to decommission Kapital when they went to Athena? I've seen so many cases in banks where the old system is still running years and years after it was 'replaced'. And Kapital was used in so many, different, parts of the business.
- akapitalidea_tw 5y agoThe answer is no. Kapital persisted past Athena for many years and was not (seriously) considered for shutdown
- igouy 5y agoIn that case, here's a glossy — https://www.cincom.com/pdf/CS040819-1.pdf https://www.cincom.com/pdf/CS040819-1.pdf
- arnsholt 5y agoI had the exact same thought! A custom IDE with all the source stored in a database is extremely smalltalk, although here the source is stored in a shared DB (it seems), rather than a per-user DB as it is with a regular smalltalk image.
- is0tope 5y agoHaving worked in an investment bank before this brought some flashbacks :)
- captainmuon 5y agoReminds me of what we used at the ATLAS experiment at CERN* . Python was tightly integrated with the application framework, Athena (which I just realize has the same name as JPM's Python framework!). You could use it as a job description language, and you would compose computation steps from classes you could write in C++. I think there was a separate `athena` executable that was just python with some packages pre-loaded. Because of all the binary modules, but even more so because of the minor syntax changes, the transition to Python 3 was really a problem (I hope they did it by now :-D). There was also a bespoke time-span database. You could store keys and values in there, but every data point had a start and end time. Then you could query what the values were between certain times, or run numbers (operational periods). We used it for example to store what configuration the detector was using when a certain dataset has been recorded. (* I've been out for a couple of years so I don't know what they use now, but I imagine it hasn't changed much.)
- kwertyoowiyop 5y agoThe Greek and Roman gods have always been a go-to for project names, LOL. We need to give some other cultures a shot!
- girvo 5y agoI’ve been a fan of metals (and more broadly elements) for project code names lately. My current project is called Cobalt!
- ttyprintk 5y agoWith particularly poor timing, I chose the Egyptian goddess Isis.
- tstordyallison 5y agoOne of the systems downstream of the JPM ‘Minerva’ (Athena) was called ISIS. It was renamed…
- tomrod 5y ago
- lmm 5y agoI'm seeing a lot of people speculating about which bank this might be; I think the point is that it's all of them. I could loosely describe a previous job as implementing Morgan Stanley's Walpole and integrating more source code management into Minerva (even though that system wasn't actually Python-based). Having a global view on everything is large banks' value-add, it's why they haven't been outcompeted by their more nimble competitors. Being able to calculate the risk of the whole bank isn't just a cool feature, it's the core value proposition of this platform. Being able to just upload your code and run it is really cool, and if you squint it looks a bit like what the outside world is trying to set up with serverless/lambda-style platforms - just write a function, submit it, and there, it's running. (But it's worth remembering that Python is not a typical programming language; python build, dependency and deployment management is exceptionally awful in every respect, this isn't as big a pain point in other languages). Obviously there's a tension between this and having good version control, diffs, easy rollbacks etc. - but because Minevera is already designed to do all that for data (because you need that kind of functionality for modifications to your bonds or whatever), doing it this way strikes a much better compromise than something like editing PHP files directly on your live server. What this article calls data-first design has a lot in common with functional programming. I hope that as the outside world adopts more functional programming and non-relational datastores, Minerva-style programming will get more popular. It really is a much better way to write code in many ways. The difficulty of integrating with outside libraries is a shame though.
- rich_sasha 5y agoI think it’s mostly true. The complaint with this kind of “industrial global Python code base”, be it at banks or elsewhere, is that often they are hastily cobbled together and depend on extreme user care to not flop over all the time. I guess banks are the archetypal places that care only about feature creation and not about maintenance or technical debt. When something does break in the end, someone senior just shouts at the poor devs until it works again - usually fixed with a hasty patch again. Similarly, documentation? Access control? Sanity? These seem to be left behind.
- lmm 5y ago
- seanhunter 5y agoI was the person who first deployed Python at Goldman Sachs. At the time it was an "unapproved technology" but the partner in charge of my division called me and said (This is literally word for word because partners didn't call me every day so I remember) Err....hi Sean, It's Armen. Uhh.... So I heard you like python.... well if someone was to uhh.... install python on the train... they probably wouldn't be fired. Ok bye. "Installing python on the train" meant pushing it out to all the computers globally in the securities division that did risk and pricing. Within 30mins every computer in goldman sachs's securities division had python and I was the guy responsible for keeping the canonical python distribution up to date with the right set of modules etc on Linux, Solaris and Windows. Because it was unapproved technology I had a stream of people from technology coming to my desk to say I shouldn't have done it. I redirected them to Armen (who was a very important dude that everyone was frightened of). The core engineers from GS went on to build the Athena system at JP and the Quartz platform at BAML. //Edit for grammar
- lanevorockz 5y agoPython Quants for the win ! I was lazy enough to stay with R but it was nice of Wes of building pandas, made adoption super easy.
- tikkabhuna 5y agoI joined the BAML grad scheme 10 or so years ago. We had a presentation from one of the Quartz guys and someone asked how they’d manage upgrading the version of Python. They were using something like 2.6.5. The whole move to 3.x was a thing. The Quartz guy just flat out said they wouldn’t upgrade. Seemed crazy to a new grad back then, but now I wouldn’t want to consider it either. Thanks for your contribution! It was amazing that even in my role where I didn’t use Quartz, I could see and search all the code. Felt quite novel back then.
- lozenge 5y agoBAML(Quartz) and JPM(Athena) both had Python 3 migrations well underway as of PyCon UK 2019. It took me more than half way down the article to identify I have not worked at the same bank as the author...
- forgotmyoldacc 5y agoReally interesting read. From what's described: Walpole (distributed job runner), Dagger (DAG that recalculates when dependencies change), Barbara (global key value store) and monorepo/fast deployment, its not so different from some big tech companies.
- databag 5y agoAt JPM, Athena: Walpole = Bob job runner Dagger = pixies Barbara = hydra The python 3 migration is still ongoing
- markus_zhang 5y agoJesus I can imagine how difficult it is to migrate the whole solution to Python3.
- tstordyallison 5y agoIndeed. Thankfully, I think it can be said the light is now strongly visible at the end of the tunnel on Python 3 (but it’s not completely done).
- timkpaine 5y agoYou can see how it's tied together in this presentation https://youtu.be/M9o9SF5-Pzw https://youtu.be/M9o9SF5-Pzw
- floe 5y agoWhat makes this an 'oral history'?
- lmm 5y agoEverything is second-hand; the primary written sources are not published publicly (and, given that these are secret systems, probably never will be).
- dash2 5y ago> In order to deploy your app outside of Minerva you now need to know something about k8s, or Cloud Formation, or Terraform. This is a skillset so distinct from that of a normal programmer (let alone a financial modeller) that there is no overlap. This rang a bell. How did deployment become such an arcane skill?
- di4na 5y agoIt is not in the value stream. Our job as sold by the zeitgeist is to write code for features. Fix bugs. And run production. The logistical part in the middle, how to get the code from commit to prod, is owned by noone and is not considered worth a budget. There lie the reason we have tools to configure prod, but nearly no tool to deploy code. Even docker and k8s dodge that.
- eb0la 5y agoThere are too many factors here. One of them is you don't own where your code runs anymore. This might scare some people until they realize they can get high availability without waiting 3 months for some server to arrive, but it makes deployment harder. I still believe the main reason people adopt CI/CD today is that "suddenly" deployment in a complex environment becomes easy and software gets tested. A lot.
- globular-toast 5y ago> One of them is you don't own where your code runs anymore. That's not new. The first money I earnt from computers was making websites. We didn't own the webservers; we rented webspace from some company. To deploy it, we literally just uploaded PHP files to a place using an FTP client. It was that simple and it worked.
- tomrod 5y agoYour example highlights the value chain of CI/CD!
- blitzar 5y agoNahh mate you want to talk to the facilities team, they deal with that sort of stuff.
- transitory_pce 5y agoTitle should be ".. of investment bank python", trading and risk has little in common with a retail digital bank like say N26. The problem with these projects is that the folks leading them have never built a real trading system in entire their lives (the ones who have been there for many years worked with end-of-day batch systems) and there is a layer of useless and incompetent "business analysts" who hide behind their incompetence by finding ways to malign developers.. Pro tip: Dont work for a bank before assessing its open source repos. They have none? Run in the opposite direction.
- tecleandor 5y agoWhen you say "The problem with these banks..." you mean the ones like N26 (not investment banks)? (Seems like coffee hasn't kicked in for me yet)
- transitory_pce 5y agoEdited.
- tecleandor 5y agoThx
- zwaps 5y agoI can report from another bank (in the top 10 globally), that recently moved from a more bespoke system (not even on Python) to having Python+Notebooks+Labs available to all - using Apache products and a global Anaconda-like Python distribution. The fact that you can use the Python, R or whatever programming language seems to be a factor.
- fock 5y agowould you mind telling, which Apache products. I've been thinking about pushing that to around my organization (mostly for replacing reporting/...) but especially the I/O-interfaces are not that great if you are not living in a central database yet. I imagine something container-like with the notebook/batch-job (can be anything really), hooking up to datasources such as SMB-shares, thus allowing people who want to automate generating report Z to just request access to folder X for their job and thus be able to seamlessly create dashboards/... even if a lot of the org still is using "traditional" workflows.
- oxfordmale 5y agoI worked for a hedge fund that build their own database on top of MongoDB. Data was serialised and stored as binary blobs. This bonkers implementation took away any advantage of using MongoDB. Unfortunately this system had a lot of political backing, and rather than addressing the short comings we were told to simply datasets to ensure they could be stored in this bespoke database. I suspect a lot of trading signals were lost this way.
- pepoluan 5y ago> I suspect a lot of trading signals were lost this way. If you can prove & show evidence about this, I'm sure they will (grudgingly) accept the need to improve. Financial institutions are mostly risk-averse, "if it works, don't fucking fiddle with it!" They need something that will impact the bottom line in an (almost) direct way. I remember working with a financial institution back in 2010. I pushed for virtualization by presenting scenarios where the main servers are impacted, we have no warm backup servers, and calculate the impact to bottom line using known MTTR (Mean Time To Recovery) values of similar scenarios (gathered from incidents all over the world). Took several back-and-forth meetings with the BoD, but in the end they accepted the need to improve and allocated the funding + greenlight the project. (That was also back in the day when Microsoft had just released Hyper-V, and when we asked Microsoft to join in the project, I talked to their head engineer, and they respectfully declined because "their internal testing shows that Hyper-V, at the moment, is unable to fulfill the required parameters". Ended up with XenServer.)
- oxfordmale 5y agoIt is very hard to prove you have lost trading signal. You would have to redo your backtesting, and would politically be fraud (high risk of getting sacked). Often trading systems will perform worse in the real world anyway compared to the simulations, so it generally can only be proven if there is a politically willingness to do so.
- rlewkov 5y agoAre you talking about Arctic from Man AHL? https://github.com/man-group/arctic https://github.com/man-group/arctic
- harel 5y agoI worked on Quartz for a while as a contractor. Hated every second of it. Python version was old (2.4 if I remember correctly when 3.x was already the popular version). But that wasn't it. It was the proprietary version of everything in the stack that got me. Proprietary ide, source control, libs etc. I noted that none of the others who have been there for years have any transferable skills that can cary them out of banking and into a startup for example. All were good devs but only knew quartz. I can say they were great quartz devs. The pay was great, but the work was soul crushing.
- deleted 5y ago[deleted]
- Chris2048 5y ago> Proprietary ide, source control, libs etc The reason this was a problem was that it meant investment was needed for each of these things, and as such fell behind. The IDE fell behind most modern IDEs, presumably because it didn't get the budget for it. The source control/ libs where usually modified versions of existing libs, but now needing to be maintained internally to remain compatible with the mainstream versions (which, again, they did not, and so fell out of compatibility). > any transferable skills It puts you in a position of arguing that you are familiar with <some-lib>, just a modified proprietary version of it.. Makes those conversations a bit more difficult.. > All were good devs but only knew quartz To be fair - this is their own fault. It's difficult providing proof in terms of "what you worked on in your last job"; but there's no reason a professional python dev couldn't become familiar with the popular versions of things on their own, given they are fairly close in functionality. Many of the quartz devs I knew already had backgrounds in Python, attended pycons etc; so knew more than Quartz.
- harel 5y agoYes, it is their fault, but the organisation didn't even attempt to nurture professional development. Stagnation was a feature, not a bug. Arguably, these guys were paid very well so they would have taken a pay cut anywhere else anyway.
- 5y ago
- urban_winter 5y agoBAML Quartz was conceived by a bunch of front-office quants who had not the first idea about the software needs of a big bank beyond the front office. There was an arrogant assumption that front office software is obviously the most complicated/difficult variety of software within a bank and therefore any system designed with front office requirements at the forefront would, of course, be perfect for universal use. This assumption was challenged at the time by various groups - I was closest to the Equities Operations software team (although not part of it) who absolutely dug in their heels and refused to use Quartz. The assumption was explosively invalidated when people started implementing in Quartz applications that fell under Sarbanes/Oxley regulations and Quartz picked up a severity 1 audit finding - because Quartz was explicitly designed for "Hyper Agility" (literal quote from the quartz docs) - and anyone-can-change-anything-at-any-time does not make for applications that the regulators trust. There was an interesting trajectory of Python hiring during my time at BAML. I joined just as Quartz was getting started and we managed to easily hire tens of python devs in London because it was easy to sell the fact that BAML was making a strategic investment in Python and therefore their (at the time relatively uncommon) skills would be highly valued. But as Quartz matured, Python developers generally came to dislike it (for reasons see original article) and it became hard to retain the best ones. And after a while Python 2.x became a massive embarrassment and, as Python became a more common skill in the marketplace, it became harder to hire good developers into BAML.
- simonh 5y agoI was at BAML when the sev 1 audit finding happened. My view was from an application support team in Risk. For us Quartz was fantastic, and it had a pretty decent permissions system. The problem is there were two miss-aligned goals. On the one hand the goal was to build a single enterprise scale system with a holistic view of the bank's data to do rapid ad-hoc position evaluations and meet new needs rapidly. On the other hand, access to all that data and all the code is clearly a security concern. By the time I left the sev 1 finding was well on the way to being mitigated, but for example it meant that instead of handing out quartz developer accounts and IDE access like candy it had to be restricted to technology personnel only.
- toyg 5y ago
- stevesimmons 5y agoNice stuff! For a view of Python at JPMorgan, I did a talk at PyData London "Python at Massive Scale" - https://www.youtube.com/watch?v=ZYD9yyMh9Hk https://www.youtube.com/watch?v=ZYD9yyMh9Hk
- carnitine 5y agoAlways funny to see the objections of new hires without finance experience to the use of floating point for pricing. It’s more related to the inherent inaccuracy of any pricing model though, rather than clients not caring about pennies.
- JackFr 5y agoI remember someone demanding that we needed to run our Monte Carlo pricer on 1024 paths, that 256 just wasn’t precise enough and one of the risk guys said “Well since we know our assumptions are wrong I’m not sure what difference it makes.”
- brazzy 5y agoThe difference between precision and accuracy in a nutshell.
- brazzy 5y agoExactly. Floating point is inappropriate for anything related to accounting (payments, balances, etc.), but when the numbers you're producing are effectively forecasts or estimates, it's no different than what floats were originally invented for (numerical modelling in physics and engineering).
- Chris2048 5y agoCan cause issues if you are accounting for things, e.g. "The sum of these values need to equal the sum of these values" In that case you'd then needs to avoid "sum_a == sum_b" and use instead "abs(sum_a - sum_b) < SOME_SMALL_VALUE"
- twic 5y ago> Clubbing it all together Wherever the author works, they employ a lot of Indians!
- streamofdigits 5y ago> Investment banks have a one-way approach to open source software: (some of) it can come in, but none of it can go out I'd say thats how they see society and their role in it more generally. Doing God's work is a surprisingly directed graph. It applies also to the broader banking world, but investment banks being the most lucrative (when not bailed out) attract talented people that in principle can close the loop and return something important back (much more so than the "sleepy" commercial bank or credit union). It would interesting if the above (potentially biased) view could be backed up by computing an open source leech ratio per industry sector. The amount of open source code used versus the amount contributed. NB: a high leech ratio does not necessarily make you the worst offender. If your business model is evil no amount of open source contribution will wash it out
- randomcarbloke 5y agoit's also not entirely true, I know of some hedge funds that have made significant contributions to open source codebases (including Python)
- streamofdigits 5y agoagree, its not entirely true but if you look at the size of the financial industry (like > 10% of global GDP) its contribution is tiny. actually besides the tech industry itself I can only think of the bio/medical industry being an important contributor (E.g the entire R ecosystem)
- esonoi 5y agoNot entirely true. Two things to consider: 1. Public sentiment. When Goldman Sachs open sourced their collections library on GitHub, it gained marginal traction (opinion: seemed more about PR to attract tech talent). When it was adopted by the Eclipse Foundation, usage rose by a non-trivial amount (based on usage stats from mvnrepository that aren’t other eclipse projects). 2. There was a massive hiring frenzy, and their due diligence regarding IP was non-existent. Garden leave doesn’t compensate for ‘strategic’ systems. Apart from “competitive advantage”, when you have someone as tenured as he who shall not be named, you mitigate the risk of being sued by not making it obvious you’re cloning a system developed for another firm. Bulge brackets are more risk avoidant than smaller firms, like hedge funds. Today, we have LMAX disruptor and Real Logic’s Aeron (basis for Akka Remote) due to their liberal policy towards open source.
- markus_zhang 5y agoThat's why working as the FIRST generation of programmers in any big financial shops is so fun. You get total ownership to whatever you build and others totally rely on you for their job. Even better, you can take months to reply to a requirement, if it doesn't come from a key stakeholder. Edit: also applies to any large corporation.
- alecco 5y agoI worked at one of the largest of these systems. It seems to be the one referred by the post. The global distributed store of pickled python objects using Event Sourcing was one of the most horrible and expensive database systems I've ever heard of. It runs on THOUSANDS of expensive servers with all data stored in-memory. To get the state of a single deal you had to open, decompress, deserialize, and merge hundreds if not thousands of instances. And 90% of the output was more often than not discarded. The Python interpreter extensions reveal the ignorance of Python by the original developers. There was no good reason to fork CPython. There were many small subsystems created and supported by lone rangers with impressive CVs and astronomical salaries. A JIT better than any other one out there (but with a lot of limitations). A meta-query system extremely elegant. But this all was a sham. The actual daily crunch/analytics was run on more classic SQL/Columnar clusters. From the distributed object database hours-long running batch jobs loaded stuff on old school DBs. And those blew up frequently. Sometimes those blow ups cost many millions in delayed regulatory reports. The queries running on top of SQL were beyond stupid and the DB engine could not optimize for them. And of course, people blamed SQL and not the ridiculous architecture and the OOP dogma. Don't work for old school banking, hedge funds, or anything like that. They are driven by tech cavemen and their primadonnas. Exceptions might be some HFT and fintech shops.
- regularfry 5y agoIt looks like sound ideas, poorly implemented. A lot of these capabilities crop up in BEAM or Smalltalk. I do wonder if Erlang had better developer ergonomics we wouldn't have seen that instead of Python as a basis.
- markus_zhang 5y agoBut it was good for the first generation who worked there. Big dollars, total control and even the opportunity to create a proprietary IDE...
- esonoi 5y agoThat proprietary IDE was a piece of crap. Monkey patching was prevalent, exponentially increasing startup time depending on the last time you opened it, and an “online” source tree where one could easily modify the source code in someone else’s ‘private’ workspace. PyCharm was a move in the right direction, but the way it worked was absurd- it would run the internal IDE in the background and sync to the file system. Given the proprietary IDE took up more resources than PyCharm, you constantly had to shut down apps so the machine had enough memory. IDEs should not be a requirement- they are tools… but you had no choice but to use it and their totally flawed code completion. Their measure of success was tantamount to having a Jupyter notebook- write code and get back results immediately.
- deleted 5y ago[deleted]
- barrenko 5y agoReaders of this thread might be interested in reading "My Life as a Quant" by Emanuel Derman.
- natpat 5y agoCompletely off topic - but I love the aesthetic of the post. "Vanilla HTML" is a design that isn't used enough. It's something I tried to apply to my personal blog, but I think it's been done much better here.
- klelatti 5y ago> This kind of Big Enterprise technology however takes away that basic agency of those Excel users, who no longer understand the business process they run and now has to negotiate with ludicrous technology dweebs for each software change. The previous pliability of the spreadsheets has been completely lost. > Financiers are able to learn Python, and while they may never be amazing at it they can contribute to a much higher level and even make their own changes and get them deployed. Coming from a slightly different part of the finance world (insurance) this rang very true. I think there is a huge opportunity here to build on the Python ecosystem - which is gaining more and more ground - and provide much more powerful alternatives to Excel and legacy proprietary systems.
- alexilliamson 5y agoAlso in insurance. I'm a big fan of using python to generate "read-only" pretty formatted workbooks. It makes the process more reproducible but people who "need my data in excel" still get that.
- grvdrm 5y agoI'm curious about experiences in other similar orgs: I work as a portfolio manager for a large reinsurance/insurance company but spend significant time in SQL, Python, Excel (not unexpected I'm sure). The Wapole platform in the article struck a chord with me. We built something roughly similar - call it Trek - that handles jobs. Jobs encompass lots of tasks - reading/writing from Excel, executing SQL, running Python, running C#. I could list many limitations, but realistically, the biggest limitation is that the platform can't handle something that it can't configure and run. In other words, the platform isn't set up with R - so no creates data pipelines/jobs that use R. Lots of people here use R (among other tools) One key problem (maybe?) is this all action happens inside the business. Trek was built by a talented actuary/programmer. No software engineering org involvement at all. I'm sure lots of folks here can imagine why: lots of red tape, general adversity to software that isn't already here, long stretches of time to get things done. Also, frankly, lots of our software devs write bad code. For folks familiar with the orgs in this article, and other similar orgs, is what the article discusses happening mostly with software devs in IT functions? Are these folks embedded in the business? And also are there folks using the more technical bits of the systems that are business-oriented - analysts, investment professionals, etc. Realize the lines are very blurry these days, but interested to learn from everyone here about the types/roles of end-users
- klelatti 5y agoReally interesting comments. I'd guess that you have proprietary (e.g. valuation / capital calculation) systems that need to interface with Trek in some way. Could you share how you've approached that at all? Also not clear why R couldn't be added to Trek alongside Python and C#?
- grvdrm 5y agoCertainly - let me try to share succinct version germane to my day-to-day - We regularly perform group/segment level risk roll-ups. Involves running computationally expensive (by insurance standards) in-house and third-party models that estimate loss from hurricanes, earthquakes, etc. A lot of our insurance data is unsurprisingly stored in disparate systems that don't talk to each other, and in some cases, don't have any useful interface that someone like me can query/view. Things are changing, but still quite a lot of history to overcome - We also have lots of stuff from outside underwriting parties in form of Excel, CSV, MDF files. - We have to bring all that together to make sense of the portfolio, so we use Trek to do a lot of the various involved tasks like running the models, processing CSV data, processing Excel data, attaching databases, creating dashboards in PowerBI (tangent: hate it) - Sample pipeline: query portfolio data from one DB, read CSV file from another third-party, pull both into risk model, kick off analysis, then execute a script to pull together results in the model's databases or elsewhere. Happy to expand or answer other q's as you have them. As for your other comment about R - it's just a matter of the install. Someone has to install R so that Trek can use it. Not a major problem. Pointed this out as a contrast in our org that is probably smaller and has many fewer devs compared to what I'm reading in the post where "bank python" sort of feels like the platform in which everything happens / everything is configured.
- mumblemumble 5y ago> There is an uncharitable view (sometimes expressed internally too) that Minerva as a whole is a grand exercise in NIH syndrome. My brief experience with this (in an adjacent area - proprietary trading) was that the more charitable view is that these firms need to be able to fully own their software stacks, and have the resources to pay for that luxury. Reading these descriptions from the article, I can't help drawing a connection to the Smalltalk ecosystem. It sounds like, to at least some extent, what these banks have built is a system that exhibits many of the more interesting characteristics of an enterprise Smalltalk system, only on top of a tech stack that they could own from top to bottom.
- igouy 5y agohttps://news.ycombinator.com/item?id=23826376 https://news.ycombinator.com/item?id=23826376
- cyberpunk 5y agoBoth frontarena and murex use python as their “vb” kind of language. If you thought your deployment pipelines were weird, ours have included putting entire python apps into single strings and inserting them to an oracle db, where a fat windows client selects them and runs them on a windows python interpreter … via citrix… :/
- konschubert 5y agoThis made me laugh out loud. Technology is awesome.
- rlewkov 5y agoThe horror
- twic 5y agoThis reminds me of an e-commerce system which stored data in a mixture of Oracle, and text files on the local disk. We handled backups by loading the text files into blob columns in the database, and then just backing up the database.
- FabHK 5y agoUsername checks out :-)
- rwmj 5y agoI'm getting serious MUMPS flashbacks with a critical hospital-wide database accessible through only one programming language with absolutely no access control or rollback.
- lyptt 5y agoReminds me of when I interviewed for an internship at Fidessa in London back in 2011-ish. I remember the team lead talking about an in-house programming language they used called FidessaC which used a mixture of C and SQL syntax. Seems like a lot of the banking world like to invent their own tech stacks.
- mtrovo 5y ago> I've mentioned that programmers are far too dismissive of MS Excel. You can achieve a awful lot with Excel: more, even, than some programmers can achieve without it This is one of the most underrated topics in tech imho. Spreadsheet is probably the pinnacle of how tech could be easily approachable by non tech people, in the "bike for the mind" sense. We came a long way down hill from there when you need an specialist even to come up with a no-code solution to mundane problems. Sure the tech ecosystem evolved and became a lot more complex from there but I'm afraid the concept of a non-tech person opening a blank file and creating something useful from scratch has been lost along the way.
- sam0x17 5y agoVery true. I often prototype algorithms and things in google sheets. One time I had backpropagation working in there, with a little button to process the next "row" of training samples.
- FabHK 5y agoPlus, a spreadsheet is basically purely functional (unless there's mucking around in VisualBasic), and has a beautiful dependency graph and calculation engine! (And that is a big part of what SecDB/Slang/Bank Python brought to the table.)
- pantsforbirds 5y agoI think part of the problem with Excel (or clones) is that you can do so much haha. Its such a powerful tool, that you end up doing things in it that it really wasn't optimized or designed for and managing the change history in excel is pretty tough. But for 95%+ of analysis you really cant beat it.
- qorrect 5y ago> You can achieve a awful lot with Excel: more, even, than some programmers can achieve without it. I've heard this a lot, but have never really used Excel. What can it do that a programmer can't ?
- dwohnitmok 5y agoBy virtue of Turing completeness there's nothing you can do in Excel that you can't do in a program. It's all a matter of speed. Having seen Excel wizards work their magic before, the dizzying ways they can slice and dice their data with the help of a combination of GUI affordances, formulas, and hot keys is truly astounding. Often times a person could build out a full set of data and charts in half an hour that might be something like > 100 lines of equivalent Python/Pandas code. And crucially often the report would have less bugs than the equivalent code because the analyst could see all the data in front of them as they were manipulating it and would naturally do spot checks along the way. Now note the "some" in that statement. A Python/Pandas master could also probably whip up the equivalent > 100 lines in half an hour. But it was really astounding just how fast Excel experts worked.
- disgruntledphd2 5y ago> Often times a person could build out a full set of data and charts in half an hour that might be something like > 100 lines of equivalent Python/Pandas code. But only ten lines of R! (Excel is kinda awesome though).
- jetbooster 5y agoAnd I think here-in lies the trap of excel. You've built this brilliant report because you're an excel wiz, but because of that you've gotten someone up the chain's attention and you need to do it every day/multiple times per day, and automating out all your shortcuts, hotkey and ui clicks with macros becomes a horrifying cludge that had you invested in something more automation oriented earlier would produce more resilient/repeatable solutions.
- alexilliamson 5y ago
- jrochkind1 5y agoIt sounds like there may not be any tests-written-in-code at all, let alone CI-style testing?
- jrochkind1 5y agoHonestly, this sounds a lot less insane than a lot of "conventional" stacks.
- barnabee 5y agoAgree. If only all software engineering was data first…
- hcarvalhoalves 5y agoThis seems baroque but I quite like the idea, seems similar in spirit to having a shared LISP environment where you can live code and snapshot images with minimal hassle. I also see as an improvement over the usual Excel mess, in particular there’s some version control and automatic propagation of changes.
- bob229 5y agoNever work at a bank. I’ve just quit barclays and they are ancient tech idiots doing a job that no one needs. Don’t waste your time
- redsid 5y agoI worked on modeling/mapping market risk schema in Quartz a few years ago and used to wonder why they were "customizing" open source software/systems in house, when they can as well as supported those initiatives directly and publicly. As a C++ dev,I had already realized the world of software tooling had passed by me, but still used to wonder at the (over)engineering of everything in quartz and involved skills that were not transferable. My view now is the value of these in-house systems is essentially a cost efficiency play on run costs, and there there is very little revenue/growth opportunities for the business from these investments. With Volcker (really the best thing to happen in the '10s) and loss of prop trading means all the market makers live off the spread, and so while there is value to minimize operational costs, they are not worth the investments that have been made. Bottom line for me is investments within large firms in capital markets are unlikely to generate revenue/profits in scale - I am sure there are some exceptions and would like to know
- oconnor663 5y agoThere's a lot here in common with the higher-prestige systems operated by major tech companies. Giant custom monorepos, sometimes with custom IDEs built into them. Big proprietary services for running asynchronous jobs and collecting logs and everything else. Data-driven frameworks for spinning up new services. Bespoke databases. All of it rings a bell. The one thing in there that really jumped out at me as "oh my god never ever do that" was using pickle for serious persisted data. I can see the upside around letting people who aren't dedicated programmers avoid thinking about serialization but...daaamn. My understanding is that this locks you into a "the API is all the code" situation where you can never change the data layout of any class once you've written it?
- tstordyallison 5y agoIt’s not just straight pickle (usually) - there’s a layer in between that allows at the very least for the handling of deprecated fields/new fields/renames etc. But - after a change - you have to choose either to leave that ‘backward compatibility’ in-place (essentially forever), or put together a job to run (on that scheduler! Hah) to go re-write in your new format. If you care enough, you might - and then you can remove your logic to handle the old names/shapes. The charm in a lot of it is in its simplicity. It doesn’t claim to very smart, but people get it - and are often remarkably productive.
- oconnor663 5y ago> there’s a layer in between that allows at the very least for the handling of deprecated fields/new fields/renames etc. That sounds pretty reasonable. Not so different from tossing JSON objects into MongoDB or something like that.
- luord 5y agoI have been a developer for eight years and yet I still get shocked about the places where Python will be used. I mean, it is my favorite language, but in the communities I gravitate towards (basically communities like HN) it has so many detractors for being dynamically typed, not being functional enough, being slow, etc, that sometimes I'm tempted to think maybe it's actually a guilty pleasure of mine, and that I should look for better pastures. Then I read articles like this and I remember why I like it: it gets the job done, and quickly (for the developers at least). It's why it's so widely used and keeps climbing. Of course, nothing wrong with learning other languages and I do try to keep up, but Python will remain my go-to for the time being.
- mst 5y agoPeople who make complaints like that are privileging their own personal aesthetics over pragmatism. Same mistake as the people who keep talking about perl being "dead" while they're deploying their production platforms on debian or red hat based systems and ignoring the fact that the packaging and release QA work for those distros is substantially dependent on - actively maintained by the distros in question - perl projects.
- lmm 5y agoSounds like someone else is putting their personal aesthetics over pragmatism. Perl is a dead language walking, the fact that there are some tools it hasn't been worth rewriting doesn't contradict that.
- mst 5y agoI'm talking about actively chosen new development because it's still the dynamic language most oriented towards being comfortable as part of a unix environment rather than simply running on top of one. Modern async/await + heavily OO based perl is not, I suspect, the language that you're thinking of when you made your comment.
- voidfunc 5y agoIt is not an oral history if you write it down…
- AmericanBlarney 5y agoI knew a few people who quit Goldman's because of Slang, although the reactive graph portion of SecDB carried over around the industry.
- mwexler 5y agoThis storage of code and data in the same oddball data structure and the "walled ecosystem" reminds me of forth. Forth had great access to its hardware, but it's "screens" and file structures were all unique to it... And extremely performance. Lots of "table-driven" systems live in bankland, and this python system sounds like the natural evolution of this...
- 0xbadcafebee 5y agoBefore Open Source, you hired a company that "did" software/computers. You knew jack shit about it and couldn't do anything about it other than "run commands". After Open Source, you still did that, but you also occasionally hired people to download and cobble stuff together to save money, and maybe one or two people to write code to help cobble together stuff. Over time this evolved into managing entire "technology divisions" of people writing code and cobbling together stuff, to manage larger and larger internal projects, to support teams, to build components, to eventually be used by one internal product used by a customer. 50 different teams to build components, and 1 team actually servicing a customer. And each component built is exactly the same as components built at other companies. Sometimes even exactly the same as other components in the same company. Nowadays a Big Bank might produce more software than Facebook, and none of it ever escapes into the world as Open Source. Whole oceans of software are birthed, live and die in the shadows. Millions of lines of code that live for half a decade. Constantly manufacturing their own hammers because they believe theirs will work better than an existing hammer, or because they're too lazy to learn how to use an existing hammer. And never sharing their custom-built hammers with the rest of the world. All because some clueless executives believe this solves their business case better than buying something off the shelf and making it work for their business case.
- webmaven 5y agoHuh. A lot of Bank Python sounds eerily similar to Zope related tech: 'Barbara' (which I suspect is JP Morgan's Hydra) sounds like a brutalist version of the ZODB created with scalability in mind. The hierarchical overlays sound like Zope's Acquisition and Containment. Even storing (and running) code in the object database has it's equivalent in Zope's Python Script Objects.