Monday, August 23, 2021

2021 | On Quants and Data Scientists in Finance

Over the years, I have often wondered what the difference is between quants and data scientists. These are both popular roles in Financial Institutions of various kinds.


I've worked in both roles at large global banks, as a quant analyst on a FICC desk on the buy side, and as Head of Data Science doing global securities research on the sell side. I've also spoken with a number of smart people in Finance about the difference, and usually the answer is that there isn't too much to distinguish the two roles. 

Similarities
The similarities are obvious: 
  1. Both roles require a deep understanding of advanced mathematics, statistics, finance, etc.
  2. Both require an ability to code, and code well, potentially in Python, R, C/C++/C#, maybe Julia
  3. Both require that you are able to model things to reflect real world realities with good fidelity
  4. Both require that you are able to articulate and explain things to non-quantitative audiences well
  5. Both have some of the hardest interviews to get in
But what about the differences? 
As a data scientist, I've given talks at the Quant Forum (gathering of all quants) at a bank on data science methods, and it was the greatest fun I had giving a presentation. I felt right at home there. And received several collaboration requests from that session. So the overlap cannot be understated. But these two roles are different, and the differences only became clear to me as I read this book: 

 
Dave Epstein discusses the central thesis of his book in this video

The Concept of Range, and the Different Types of Domains
In this book, the author explains that there are some "kind" domains that allow for deep specialization, where experience helps you make better decisions and more effectively deliver value. The more time you spend in the field, the better you get at it. 

There are also "unkind" or "wild" domains where the opposite holds true. In some of these, having more experience might give you more confidence, but unless you are humble, leveraging old learnings in new problem contexts can lead to more errors i.e. experience doesn't really help in problem solving. 

He illustrates this idea with several examples - from sports using golf and Tiger Woods as an example of a "kind" domain, and with tennis and Roger Federer as an illustration of the "wild" one. He further underscores his point with Chess - grandmasters can reproduce a board with several pieces exactly with only 3 seconds to see it IF the pieces are placed such that the scenario can occur in a real chess game. However, if random pieces are randomly placed, they cannot replicate the board unless given significantly more time to study it, and in the latter case total chess novices can do a better job.

Another example he cites is Music. Did you know that Yo-Yo Ma, the world-renowned cellist tried several other instruments before settling on the cello? This works because music is a "wild" field - you can pick up broad patterns that might work generally, but then again, might not. Then when you specialize in a narrow "kind"-er domain (that of playing the cello in this case), you try those patterns to go deep and excel, keeping what works and discarding the rest.


So how is all this relevant? 
As a data scientist, even if you pick just one field, say finance, you develop and use lateral skills a lot. You may work with consumer spend data and basket analysis for retail, with Fed Beige Book data for global macro, with satellite data for real estate or oil/energy markets, with news data for other verticals, etc. You have a wide and deep knowledge, but you pick up sector knowledge as you go, working closely with specialists.

As a quant, you (usually) work on one desk, and specialize in one or two markets. You learn all you can possibly learn about those markets, and go as deep as you possibly can to identify, isolate (where possible), examine, model, and forecast particular variables and the relationships between them. You are a specialist in your sector.

A data scientist may not need stochastics, but should have the intellectual capacity to learn it. Most quants should know enough stochastics to be able to do their jobs well.

In Conclusion...
Both the quant as well as the data scientist roles in finance offer stimulating, intellectually challenging work. I guess in the end, your ability to make a strong positive contribution comes down to your preparation, expectations, firm culture, and the competence and quality of the team you work with.

How does this post match with your views? Please share in the comments below.

Sunday, July 4, 2021

2021 Learn Blockchain & FinTech - A Course-Map to Build Skills Quickly

Blockchain & FinTech are all the rage today. Many companies are looking for people skilled in these areas, and as with other leading edge technologies, these skillsets are hard to come by at quality. In this post, we look at some good coursework that would help people trying to gain some level of knowledge and expertise in these areas.



Excellent Content for Free

Coursera offers some excellent content to learn trending and very in-demand subjects like blockchain and fintech from top schools. These courses can be taken for free on audit, or you can pay a nominal amount to earn a certificate that you can put on your resume and LinkedIn profile online. My CV already has 30 or so of these, so personally I now only take courses on an audit basis, because beyond a point, continuing education on the CV gets lost in the noise, though up-to-date skills are always widely sought out by employers.

That said, here are some courses and specializations that are useful to learn these topics:

Financial Technologies (Fintech) Innovations Specialization from the University of Michigan's Ross School of Business


Fintech: Foundations & Applications of Financial Technology Specialization from UPenn's Wharton School


Fintech Law and Policy from Duke University


Blockchain Revolution Specialization from INSEAD - taught by the Tapscotts, who also wrote a bestseller on this





These are all excellent courses – they cover the same ideas from different angles, and it is worth the time to learn things from various perspectives to gain mastery over the technical and business aspects, and the economics of how this technology might be applied in enterprises to deliver business value. These courses (particularly the UMich one) do a good job at demystifying the applications of blockchain, and help you cut through the hype. They also teach you how to analyze business fundamentals and design how best an application might utilize blockchain across various industries, if at all. 

The Duke University course gives you a sense of the legal and regulatory issues that Fintech firms have to be aware of and comply with. While the focus in that course is predominantly USA-based regulations, it leaves you with a broad enough understanding to think carefully about the kinds of legal issues these firms might face in various other jurisdictions as well. 

Coursera Platform Issues

While Coursera offers excellent content which is getting better, it is also getting significantly worse as a platform from a usability perspective – with quality degrading considerably over the last few months. Some issues I have noted in recent months with the Coursera platform:

1.       As it has gained in popularity, widespread use, and increased revenue (many models available now including Coursera Plus) its pages are no longer responsive to the point that using the site has many annoyances - slow loading being a major issue. Worse, there is a bug in their "in-progress" course display (same page displays though counter advances). I have raised this as an issue with them.

2.      It loses which videos you have already watched, and doesn’t mark progress accurately - happens quite frequently.

3.      It logs you out at random times while you are using the platform to learn, and you have to log in again. Happens with annoying frequency.

4.   What I also dislike is in a number of courses, there are peer-graded assignments. While these are not bad in and of themselves, the issue arises when there are not many others taking the course at the same time - since Coursera bills by duration enrolled, you have to wait for other students to become present on the platform in that course for you to earn your certificate, and this waiting can get costly. I learn at high speed, dedicating myself to completing a specialization in a few days - so many a times have to give up on the full specialization certificate to avoid having to spend more money waiting (I just get certificates for individual courses leading up to the capstone).

5.       It (occasionally) loses credentials earned on the system, though if you contact them, they are able to recover these for you.

Content will keep bringing me back to Coursera, but it is unfortunate that with the platform gaining so much more in terms of visibility and revenue, the quality of the user experience is slipping. I also use other platforms like EdX, Udacity, Udemy, etc. and each has its own quirks. Please share in the comments what your experiences have been, and if you are aware of other courses in Fintech or blockchain that merit an honorary mention. 


 



Tuesday, June 1, 2021

2021 | Learning Statistics easily

 

The great thing about statistics is that you get to play in everyone's back yard     -- John Tukey (famous statistician)

There are good ways to learn statistics, and not so effective ways to do it. Like all else math, having a good instructor or good books to self-learn from makes all the difference. And having a good grasp of probability theory and the attendant mathematics is a good help too. 

But why the sudden interest in statistics? With increasing importance of data science and machine learning, a lot of the algorithms require a solid understanding of foundational mathematics. Statistics forms a good base from which to grow at least some of the knowledge base. There is of course no denying you need more math than just stats, however.

Some books I think are outstanding to learn statistics effectively are: 



These books are both extremely readable and chockful of examples. The second book is advertised as "Your easiest reference to the nastiest statistics" and it lives up to the hype. Things have never been clearer. 

Some people tend to look down their noses at the Dummies series of books, but I find them surprisingly readable and very informative. They are actually not dumb at all (in my opinion anyway). 



In addition, there are some excellent courses on Coursera to learn statistics with little pain. Good luck!

Do share if you know of other books or resources you found particularly helpful.







 

Tuesday, May 18, 2021

2021 update | Some interesting reads - Strategy, Marketing, Self Improvement, ...

Recently I read a few very interesting books whose messages really resonated with me. After all, if books are able to motivate you to become the best possible version of yourself you can possibly be, and then encourage you to persevere, push through the hardships along the way to go for the gold and really make a difference in the world, there isn't much more (in my opinion anyway) that you can ask from them. True, books take time to read, but as Mark Twain once famously remarked: 

There is little difference between who someone who won't read and someone who can't.                                                                                                             -- Mark Twain

 


I almost didn't pick up this book in the library. From a distance it looked like it was about cooking. Then I thought to give it a try, and I am glad I did. Unfortunate title (the author is a fan of good food and cooking), but packed chockful of excellent ideas in how to build a brand, differentiate from competitors, and deliver outsize results for your business. This is one I will likely re-read. Impactful.



Bernadette Jiwa was a real find. Her books showed up in my suggested reading lists in Amazon, and I figured why not give the book a try - free samples and all that. 4 or 5 books in, I must say she delivers a real punch. We may know the underlying messages intuitively, but when presented with so many examples that are so concrete, it really drives the points home, and makes them actionable. Leaders should know to tell stories... but they should also know what stories to tell when for maximum impact. 


Seth Godin needs no introduction. I find some of his writing powerful, and other parts somewhat less so - but that's just me: like everyone I like some ideas more than others. Regardless, the above two books I think are very interesting and encourage the reader to think more. When should you quit and when should you push on? How can you deliver a valuable positive experience to your customer? (notice this last common thread in this post?)


This one is a truly powerful book. The stories, ideas, and tools he shares within it will accelerate learning, focus on results, and achieving of outcomes. Jim Kwik's personal story is also touching and relevant - a childhood brain injury led him to be called "the boy with the broken brain", with severe learning disability. Not only did he dig himself out of that predicament, but now he helps "more normal" people excel at what they do. Inspiring. 


I find a lot of senior people in firms claim they are "doing strategy" or "being strategic", but don't really have a plan or method to what they do. Sometimes they merely follow a pre-defined plan or template that they fill in. Others run "strategy sessions" yearly, requiring their teams to create PowerPoint slides that change year to year, with little to connect them to what they're actually doing in the business. Books like the one above cut through the noise and let you learn how to do it right - assuming of course that you have the humility to accept you need to learn something, and not continue to wing it ("you're the expert, and no one will know the difference").

 


Simon Sinek needs no introduction. I really like his work in general, but this book more than the others. Knowing why you feel you need to do something gives you the fuel, the courage, the grit to stick with things when the path is difficult, to walk through the mud, head held high, with eyes fixed on the stars. Inspiring.


Don Miller tells you step by step how to build a sales funnel, then use it to drive your brand's adoption more widely. Very readable, and the content is immediately actionable. The kind of book that gives you good return on the time spent reading it. His other book tells you how to effectively build a story brand.


Lower your barriers to doing what needs to be done. Focus on big picture success and let small imperfections go in every engagement. Set easily achievable binary outcomes for success. These are some interesting takeaways from this book. E.g. if you need to exercise every day, define success as doing anything, however small, to contributing towards that goal - even one pushup just now. Then grow from there. Be kind to yourself as you start working on developing habits. Gradually ramp up towards where you want to be. Most self help books have one core idea - which is that before people set out to change the world, they need to fix the conversations they have with themselves, in their mind. Novak Djokovic is right, you do have to win the game in your mind before you win it on the court.





Tom Ziglar is the son of legendary motivational speaker Zig Ziglar. Zig rose from humble beginnings to become a leader in his field. Tom recounts some stories from his interactions with his dad, and also summarizes some of the lessons you get from watching Zig in action in some of his later presentations. What I particularly liked is that Tom doesn't shirk from sharing from his failures - this vulnerability lends his book an authentic feel. 

Sunday, May 16, 2021

Eight people sitting around a table ...

 A friend recently asked me this question, 

Eight people including you and me are sitting around a table in random order. What is the chance that I am sitting next to you? 

so I tried solving it with a nine year old from first principles. Was amazed at how clearly kids think. Sketching out the solution we came up with together here.

  1. Imagine there are only two people in the group - this is just you and me. So we are sitting next to each other no matter which way you walk around the circular table. Not that interesting. 
  2. Imagine 3 people - you, me, and a third person sitting around the table. Then, you are next to me on one side, the other person is next to me on the other, and no matter how we sit at the table, you are always next to me. 
  3. With 4 people, things start getting really interesting. I take one seat. There are 3 seats remaining. If you take the seat to my left or right, you are next to me. If you take the seat across from me, that is the only case where you are not next to me. 
  4. With 5 people, again I take one seat, the seats next to my seat on the left and right are next to me, and the remaining (5-3=) 2 seats are the ones that are not next to me. 
  5. Making an inductive leap in reasoning, with N seats, there are N-1 seats after I take one seat, of these, 2 seats are next to me on my left and on my right respectively, and the remaining N-3 seats are not next to me. 
So, to summarize, with N seats, if you sit in N-3 of those N seats, you are not next to me, in 2 of those N seats you are next to me. Given I take one of the N seats, you are next to me when you take 2 of the N-1 seats, not next to me otherwise. Nice, elegant solution from first principles to an interesting combinatorics problem that is often asked in interviews.

Sunday, May 9, 2021

2021 Quant Interview Questions

copyright-free image from pexels.com

These are questions I routinely ask in interviews. Candidates can have access to a computer if they want, to give or test their answers for those marked with * below. These are ice-breaker type questions at the AVP or VP level positions in Finance. You should be able to do them in 2-3 minutes or so. For the coding questions say a max of 5 minutes would be very generous. Enjoy!

Note: the * questions are especially useful when, during COVID times, interviews are conducted remotely. Rather than ask people to code up solutions (in HackerRank, say) and check them, easier to simply check if they are able to write the code snippet on the fly, and give the correct answer.

copyright-free image from pexels.com
  1. I toss a fair coin 5 times, and get H, H, H, H, and H. The other interviewer tosses the same coin 5 times, and gets H, T, H, T, H. Which sequence is more likely, and why?
  2. I toss a fair coin 1 time. If it comes up heads, I pay you $1M, if tails, you pay me $1M. The other interviewer offers you a different bet. She tosses the same coin 1000 times - each time, if it comes up heads, she pays you $1K, if tails, you pay her $1K. Which bet would you take, and why?
  3. Imagine a spreadsheet with 1M rows. In Column A, you have all the numbers 1 to 1,000,000. In Column B, you have the squares of the corresponding numbers in Column A (i.e. you have 1, 4, 9, 16, ...). In Column C, in each row you have the last (unit's place) digits of all numbers from Column C. Then I take all the digits from Column C and create a set (unique list) of them. The number of elements in that set is? How would this answer change if in Column B, I had used cubes instead of squares?
  4. *Alice offers you a bet. She first charges you $1, and then rolls a fair die three times. If each roll score is (strictly) higher than the last, you win, otherwise you lose. How much should you ask to be paid when you win, so the game is fair to you?
  5. *I sample 3 letters from the alphabet without replacement. What is the probability they are in increasing alphabetical (or lexicographic) order? e.g. p, r, w 
  6. *The digital root of a number is the iterated sum of its digits till you end up with one digit. For example, the digital root of 412312 is equal to the digital root of 13 which is 4. The Fibonacci series is a series of numbers that starts with 0 and 1, and where every subsequent number is the sum of the previous two numbers. What is the digital root of the 3000th Fibonacci number?
  7. What is the probability that two people in Manhattan have the same number of hairs on their respective heads as each other? What is the mathematical principle you used to solve this?
  8. *I roll a fair die until I get two sixes in a row. Angela rolls the same fair die until she gets a six followed by a five. On average, who has to roll more times to reach their objective? Can you explain intuitively why this is the case?
copyright-free image from pexels.com

To keep things fresh, I will of course swap questions from time to time, so it is unlikley that even if we were to meet, I will ask the same questions. However, good to prepare!

ChiPrime tries to answer problem #5 above here. But it is trivial to code a simulation in python with itertools to get the same answer.


The python code is below: 

import itertools; # module that performs permutations
import string; # to get the lowercase letters with less computational gymnastics

alpha=string.ascii_lowercase; # gives all lowercase letters 'abc...z'
x=itertools.permutations(alpha,3); # all 3-letter permutations from alpha
p=[i for i in x if i[0]<i[1]<i[2]]; # all permutations that meet the condition
print(len(p)); # computer prints 2600, the correct answer.

[8] above is solved here, and [4] here. 

For more of these kinds of questions, check out ChiPrime.com (click button below for more!)

ChiPrime

Sunday, May 2, 2021

2021 Top 10 Tips | GMAT/GRE Quant Success

Beat Quant Sections of Competitive Exams (GMAT, GRE, etc.)

Competitive Examinations are not getting easier. With more people taking them, you need to score better to be able to achieve the coveted 98th or 99th percentile to distinguish your application from peers who want the same things you do - admission into top schools/programs. Almost all exams these days have a math section, and for many people it has been years since they left behind painful memories of high school math. Here we present the top 10 tips that worked for us. They may for you too.

  1. The Trick of 10s
  2. Focus on the Ask
  3. Prep Harder than the Test
  4. Build Experience 
  5. No surprises on Test Day
  6. Track the Ratchet
  7. Identify Difficulty
  8. Filter and Guess
  9. Master the Time
  10. Remember the Why

1. The Trick of 10s

Only perfect practice makes perfect. -- Vince Lombardi
While training, do problem sets of 10 questions each, all focused on a particular topic. Keep at this till you score 9/10 or 10/10 consistently. Start with simple questions, then work on harder ones. But keep going. You should correctly hit 9 or 10 out of every 10 consistently before you move on. And you need to really work on this, because with your day job and studying evenings, nights and weekends coupled with the number of topics you need to cover, you don't have that much time before test day. If you can only focus for 5 minutes at a time at the end of a long day at work, fine, do sets of 5 problems at a time. 

2. Focus on the Ask

If you don't know where you're going, you'll probably end up somewhere else. -- Laurence Peter
When you read a question, focus on what the final ask is, and let it become second nature to jot that down. Underline or write down important facts from the question. Read the question quickly, carefully and completely but with mind focused on your target - what the question is asking. Then work on that answer. Solve the right problem while trying to solve the problem right. 

3. Prep Harder than the Test

I do not know how I am going to win. I just know I am not going to lose. -- US Army Rangers
Copyright free image from pexels.com

Not a popular idea, but if you really want that M7 MBA or that graduate school admission in the school of your dreams, you'll have to put in the work to show them you deserve that seat more than many of your peers. Work harder on the content than your peers will. Really understand it. And don't be too kind to yourself during prep - use the hardest material you can find, but demand the same high score of yourself as you would on the real exam. You'll get there, but it takes time, patience, and a little bit of a scare to motivate yourself in the early stages. Be determined and resolute. Do not accept sub-par performance from yourself.

4. Build Experience

The more you sweat in Training, the less you bleed in war. -- US Navy SEALS

 (3) is about using difficult quality material that focuses on the test curriculum. This one is about doing more prep - the quantity. You'll have calm confidence going into test day. I'd do two complete GMATs back to back - it is grueling, sure, but no easier way to almost guarantee a good outcome. And your mind will become tough - you will be able to easily handle small upsets on test day because you would have seen it all many many times in prep. Small things won't throw you off your game.

There is no compression algorithm for experience. -- Andy Jassy, CEO, AWS


5. No Surprises on Test Day

Everyone has a plan until they are punched in the face. -- Mike Tyson
You should take your punches early in prep. You should have seen every type of question or problem before test day. Sure, there will still be one or two that might be new, but you'll have a general sense of how to approach these. Look up where the test is to be taken, scout the area, explore how you'll get there and back, time your runs. Do not leave anything to chance. Wear your favorite clothes, eat your favorite food, generally get yourself into a good mood. Remember what went poorly in early practice tests you took at home, how you felt, and how you improved on those aspects before test day. Feel the confidence, expect to do well. Really visualize it.

6. Track the Ratchet

Many tests these days are adaptive. As you answer more questions correctly, you get harder ones. Build your ability to classify difficult questions into levels. You're seeing too many difficult questions? It means you're doing really well. Use that as positive reinforcement as you work through the rest of the test. And you've worked on harder material in training right? You're all set to conquer this. If the ratchet slips lower, don't panic - so you may have made an error, or perhaps you found a question to be harder than the test thought it was, just focus on doing your best in each question. Every right answer brings you closer to your goal.

There are many fine websites and sources that provide content for improving your performance. A completely free one that has a ratchet function built in, is ChiPrime. The Adaptive Test you see on that web-page gives you the flexibility to train at your own pace, and further optimises on your time, so you solve only 5 questions in each quiz. While there, you can also read some lessons, watch some solved problems, etc.

Image from ChiPrime.com website

7. Identify the Difficulty

Math questions are usually difficult for one of two reasons - a. the question takes lots of calculations, or b. you don't even have an idea of how to proceed. You should train yourself to see which questions at the hardest levels you are seeing in the test.

For the first of these, usually there is a short-cut. If you don't see it, approximate if you can, and get to an answer, or try other ways to maximize your chances of getting the question right (see below) and move forward. 

(b) is much more devious - you must be doing really well in the test if you see these questions. Here, you'll have to play the odds, find a good way out, and move on without wasting too much time.

8. Filter and Guess

Usually, for multiple-choice questions (MCQs), there are at least a couple of choices that make no sense. Your first task is to eliminate these. If taking a computer adaptive test, write down the letters a to e or however many options are offered, next to the question number on your scratch pad, then start striking off options that make no sense. Then whatever you are left with (hopefully just one), must be the right answer. If left with 2, try to figure what makes more sense, and pick that one. You've already improved your odds in the guess from 20% to 50%. 

9. Master the Time, Stay in the Moment

Yesterday is history, tomorrow is a mystery, but today is a gift. That is why they call it the present. -- "Master Oogway", "Kung Fu Panda"
Copyright free image from pixabay.com

People that do poorly manage their time poorly. They worry about how they're doing as they take the test, worry about whether they answered the previous question correctly, wonder what the next question or next section will be like, worry about the verbal section while doing math, etc. But you know better. You are 100% present there at the test, with the question in front of you. Nothing else exists. Other than time. Every tick of the clock counts, and each tick brings you closer to your goal. You will use those ticks wisely just like you trained at home. And you will excel.

10. Remember your Why

If you know yourself and your enemy, you need not fear a thousand battles. -- Sun Tzu, "The Art of War"
Video summary of Simon Sinek's "Start with Why"

 Simon Sinek has a very nice talk about how, when people know why they are doing something, they usually do a much better job at it. You know why you want that M7 MBA or that graduate degree from the school of your dreams. Spend some time every day thinking about why you want it, and how getting it will help you realize your life goals. Feel the importance of your exam performance. You know it is important, and given you've put in more effort than most, know you'll do well. Use that to drive you to success. Use it on down days where you feel spent even before you start.

Arnold Schwarznegger tells the story of how, when a reporter asked Muhammad Ali how many sit-ups he does a day, his reply was "I don't start counting until it starts to hurt". You don't achieve greatness by sitting in your comfort zone. Want an outsize win? You'll need to put in outsize effort.


In Conclusion...

Copyright free image from pexels.com

There you have it, ladies and gentlemen. Power through the hard parts, keep your head in the present, and master time. You'll get what you want - in the competitive exam and beyond. Feels good to summit, doesn't it? I had this poem (Thinking by Walter Wintle) pinned to a wall of my cubicle early in my career, and it drove me to work as hard as needed to achieve my goals.
The difference between a successful person and others is not the lack of strength, not the lack of knowledge, but rather a lack of will. -- Vince Lombardi.