1. 15

  2. 2

    Call me when I can upload an XLS and get an API…. Just kidding.

    I have heard many times that Excel is probably the widest known and used programming language on earth. It’s great to see it gaining Turing completeness.

    1. 5

      Excel has been turing complete for a long time: people have built turing machines in the formula language. And of course there’s always been VBScript or whatever it is.

      Many people in the financial sector use Excel as a GUI to execute trades - they have a sheet in a file that pulls quotes, another sheet they can use to enter the trade on which they can press a button and the trade is made. The trade is then written to their blotter for the day (another excel sheet in the same xlsx file) and then some XML/JSON is sent to back office at close of business.

      I’ve seen people do this for trades with big notional values: millions of quid. And of course the trade book as a whole is much bigger. During the working day (before it’s sent to back office) the gold source of data is that blotter sheet in excel.

      It’s all in good fun :)

      1. 1

        yep. Financial contracts (also can be thought of composeable trade functions), especially swaps – are the original ‘Smart Contracts’. And the ‘language’ for those smart contracts, has been Excel – for a long time.

        A typical smart contract would describe initial settings per tier + event queues + events. Those events are, typically, market events, or credit events (eg defaults).

        Then for every contractually relevant combination of event queue + event, there would be a contract ‘action’ (that is something that would cause a trading activity or an expiration, or evaluation/talieing of something to take place).

        Then the middle office trade execution, trade settlement and trade lifecycle platforms are the ‘execution’ engines for those Smart Contracts :-).

        Of course this is a trivialization, but that’s what so called ‘sell side’ or investment banks do, they create and then lifecycle-manage those smart contracts.

    2. 2

      Now we need to be able to use an excel as a server-less application service.

      Upload the excel to the servers, and call the init function.

      1. 2

        It’s not complete, but covers enough I’ve used this once or twice to do that: https://pypi.org/project/pycel/

        1. 2

          fwiw GSheets makes for a great ui for your internal non programming fellows, you can easily link it with a cloud function and have it populate a proper app database. I used it for a quick and dirty RBAC dashboard before, no regrets.

          1. 1

            How do you access it via api? Don’t you need oauth?

            1. 1

              I added a big “save” button in the google sheet that triggered a cloud function. Cloud function did an immutable update in the db table.

              If you are referring to the permissions of the sheet to exec the functions, yes you need to oauth it. I did then invite the right users to share the sheet. It was for minor company stuff, and I’m aware that security is terrible, but for a quick and dirty app that was good enough.

              I would NOT recommend on a public sheet!!