• Sharebar

I'll be interning at a whore house this summer and I've been strongly advised to learn Excel VBA and perhaps C# for backtesting. Unfortunately, my current coding skills leaves much to be desired as I can simply dick around with Python. In order to get up to speed with some programming I've decided to take an 80% course load this semester to focus on coding during my spare time, in addition to taking econometrics as I believe it would give me some grounding on basic time-series concepts which may be quite beneficial for me. However, I haven't used Excel in ages and I'll have to learn both VBA and C# (object oriented, vastly different from Python) from scratch.

Hence, I've set a goal to refresh some of the key concepts in Excel and learn VBA in under two weeks, hopefully giving me adequate time to also learn C#. What are some of the most efficient resources that I can use in pursuit of this endeavor? Any advice would be much appreciated.

Cheers,
Macro

Comments (5)

  • swordfish712's picture

    You're in luck, I was basically in the exact same situation as you, having to learn those exact two languages. I did a good amount of research and here's what I would recommend. Firstly, you should spread out the learning over the next few months rather than condense it into 2 weeks since your internship starts in the summer. If you cram everything now, you'll likely forget most of it by the time you start work.

    1) Get this book: http://www.amazon.ca/Head-First-C-Andrew-Stellman/...

    It's far superior to many of the other C# texts out there which are mostly reference texts. You build more and more knowledge as you go through each chapter in the book. It teaches you C# AND OOP. It has copious amounts of exercises to reinforce learning all over the book. It even has 3 labs which progress in difficulty, with the final lab requiring you to build a fully functional Space Invaders game in C#. It's more engaging than any of the other dry programming books you can get out there. Get this book, read 30 pages a day and do all the exercises, and you'll be in good shape when you finish the 800 pages (or if you insist on cramming, do 100-150 pages a day). I would highly recommend looking for some trading related projects to do after you've completed the book.

    2) Get http://www.amazon.ca/Excel-2010-Power-Programming-VBA/dp/0470475358

    Unlike the other book, just reading this one probably won't do you much good. I recommend you ask the other forum members here to give you some projects to do (related to trading, options, etc.), while you try to apply the techniques from the book as much as you can. You could read the book from front to back, but I don't think you'll retain much unless you're actually building stuff and applying the new concepts as you move along. The book does come with a CD with plenty of examples.

    And if you really want to be efficient in learning, think about things in terms of what your end goals are. Your end goals are to be able to develop useful programs for the traders. So find out what they'll want you to build. Then try to build whatever that stuff is. But if you think about your other end-goal, which is leaving a good impression on the traders, you'll probably want to develop the full foundation of knowledge so you'll more likely be able to exceed their expectations and add value with your abilities.

  • Dr Joe's picture

    I would say that the most common mistake people make in learning VBA is in thinking about how to do it for way too long. Just get your hands dirty and do it. As long as you know how coding works, it should be easy. Make some simply exercises for yourself. Start off by recording marcos of what you are doing and seeing what the code looks like. Then learn logical operators (if then else etc) and how to use these to make decisions. Then learn how to use loops (suggest picking 1 loop method - "for" is easiest, the rest are all the same). A couple good exercises:
    1. Use Monte-Carlo to price an option
    2. Sort sheets in a workbook in alphabetical order (google it for the solution, many ways to do it)
    3. Create a function that returns the "rank" of a number in a set of numbers
    4. Create a function that takes arguments SheetName and RangeName and returns the value of that range on that sheet (pretty useful if you don't like to use indirect function)
    5. Macro to color all cells in selection a certain color if they don't have a formula/don't have a number/are blank/have precedents/have dependents (the last 2 are pretty tough actually)

    And so forth. Think of fun things to do and just do it. Maybe create something that allows you to price binary or asian options using monte-carlo (pretty simple). Just get to it - stop thinking about how to best approach it - the answer is head first.

  • Macro Arbitrage's picture

    Thanks a lot for that insightful response, swordfish! You've presented some excellent pointers that I certainly need to consider. I've just downloaded an ebook copy of the Excel Power Programming book and I'll download or perhaps buy the Head First C# book. I also noticed that you posted ".ca" Amazon links- I'm actually from Canada as well.

  • Macro Arbitrage's picture

    Gotta agree with the "dive in, then think" approach, Dr. Joe. I just wanted to ensure that I'm doing things as efficiently as possible. Thanks a lot for the outline and exercise suggestions, they will certainly come in handy.

  • Koho's picture

    To unlock this content for free, please login / register below.

    Sign In with Facebook Sign In with Google

    Connecting helps us build a vibrant community. We'll never share your info without your permission. Sign up with email or if you are already a member, login here Bonus: Also get 6 free financial modeling lessons for free ($200+ value) when you register!