Is VBA still worth learning?

Discussion in 'App Development' started by Howard, Sep 10, 2019.

  1. Howard

    Howard

    Hi all,

    The question is basically in the header. In summary, I don't know much about programming, but do of course understanding basic logic and programming concepts.

    I have Excel workbooks that are loaded with cool VBA/macros which I use on a daily basis. Most of it is written by others. Some of it I actually wrote myself by trial and error and being a flat out thief stealing/adapting code and understanding most of it (but not being able to create it from scratch).

    Having some extra time for new projects soon - I wonder if it's finally time to start learning a bit more programming. This leads to the common question of which language to choose where there seems to be a myriad of answers (Python seems popular if speed isn't the main concern).

    Since I have some very, very basic exposure to VBA and use Excel a lot it seems like VBA would be a natural choice. On the other hand, I recall people here writing that one should just forget about VBA and jump straight to R or Python instead.

    Long term - I've wondered if it'd be good for me to migrate to some other solution than Excel, but not sure what possibillities there are for analyzing/sorting tabular data?

    Excel have a huge advantage in terms of support and getting help since it's so commonly used, but I am already experiencing some limitations in terms of speed when handling large spreadsheets.

    Thanks in advance.

    Howard
     
  2. gaussian

    gaussian

    Use the best tool for the job. If your trading style isn't limited by Excel and VBA why switch? Finance is basically just one giant spreadsheet. To be honest, I mostly program as a means to collate data. My stuff isn't anything an Excel sheet and a little elbow grease couldn't do. In fact I mostly prefer to use Excel.

    Migrate the chunks you need out of Excel. If you pick up C# you can write addons to help you offload stuff to "outside the sheet" in something a little lower level than VBA.

    Again, Excel is absolutely fine. Work around it until you absolute can't/won't - then look for something else. Python has it's own problems - dynamic typing means you don't have an IDE that can discover types and 15,000 lines later you'll look back and wonder what you're even passing in. Believe me, I work professionally in Python and have written a handful of Python projects around finance. It is a great language to replace Perl as a prototyping language but it is absolute garbage for anything at scale (for a more practical example - look at the problem dropbox is having and how they've basically had to hack type annotations and type checking onto Python in order to continue to use it).

    EDIT:

    To address your question on VBA directly - it will not dramatically improve the speed of your sheet. It is better than using formulas but you're still using Excel as a VM. If speed is a concern considering writing Excel addons to do what you need or offload data processing/collating to a language better suited for it and only load in the refined data into Excel for final processing/study.
     
    Ninja, Howard and drm7 like this.
  3. Turveyd

    Turveyd

    VBA Coder, Excel, Access, VB6 looked at the others, they seem hard work for the sake of just being hard work which annoys me.

    Generally these days I just google and adapt bits of code and put it together, doesn't really matter to me if VBA or C these days, once you can code, you can code.
     
    Howard likes this.
  4. tsznecki

    tsznecki

    For a job in tech, no. Finance, sure but not insta hired.

    For personal projects, VB is just fine. No need to over complicate things. Excel goes a long way.
     
    Howard likes this.
  5. trust me , no. Unless you want to use excel to to all your analysis. you should give python and pandas a try. They have better functions and plotting methods
     
    Howard likes this.
  6. tonyf

    tonyf

    I know nothing besides VBA (self taught) and it is more than enough for me.The one thing you want to start with is looping - not doable without VBA.

    IB provides a template spreadsheet loaded with VBA you can start with...
     
    Howard likes this.
  7. R1234

    R1234

    Excel VBA is what I still use for about 50% of my backtesting and execution. A few years though ago I started to run into capacity limitations for some newer forms of research I got into, namely cross sectional analysis+ranking of securities. And when I started to analyze pair combos it got into thousands of time series which became unstable in an Excel/VBA framework. That's when I migrated to R and then finally to Python. Python is made for this kind of thing. And the function libraries make the research process a pleasure. In Python you can often write one line of code to accomplish something that would have been a real challenge in Excel/VBA.
     
    Howard and d08 like this.
  8. dakr

    dakr

    I use the minimum technology required to do the job. If it can be done on a napkin, use a napkin. Only use technology if gives added value. In saying that I do find programming useful to scale up analysis to bigger chunks of data. Used matlab since I picked up ernie chan's book a few years ago and it was recommended. I keep finding new and amazing things that matlab can do. Python is all the rage now so useful if you need to collaborate with others.
     
    Howard and tonyf like this.
  9. VBA is mostly restricted to the WinDOHs universe. Outside of that, it is useless. I strongly suggest getting into Python. It is cross platform and very extendable, and very simple to learn the basics. Even a basic GUI is easy, with the right tools, such as tkinter or pyqt. Alternately, go in for C. Not C#, C. Or C++, whatevah. Locking yourself into the mockrosoft cage could possibly limit you and what you can do at some point in the future.

    Back in the day I used to do some VB programming, starting with VB3, then VBDOS and VB6. Never messed with VBA. Never saw the reason, and I had to be careful not to write anything that would not run under OS/2 or Linux, for much of that time.
     
    Howard and d08 like this.
  10. ironchef

    ironchef

    I finally figured out how to program in VBA Excel. So far, that is all I need.

    That said, I do have a question: How do I program Kalman Filter algorithm using VBA? Or are there existing subroutines I can use?

    I think I asked that before but forget the answer. This has nothing to do with trading, I am dreaming up a different project that might need best estimation going forward.

    Thanks guys.
     
    #10     Sep 13, 2019
    Howard likes this.