For the fourth Summer of Math Exposition, I chose to reimagine “A Simple Derivation of the Black-Scholes Option Pricing Formula” as a more detailed, Manim-animated YouTube video.
It’s structured as a self-contained lesson that walks through a complete derivation of the Black-Scholes-Merton formula in a way that’s accessible to anyone with knowledge of calculus-based probability and statistics. No financial background is needed.
I also included 6 exercises with hints and sample solutions to encourage working through the derivation on your own.
The source code for these animations is available at https://github.com/ragibson/manim-videos
Key differences from the original post#
There are several notable improvements over the original post:
- I introduced the financial background on stocks and options to keep it accessible to a broad audience.
- Instead of presenting geometric Brownian motion / the lognormal distribution as an assumption of the Black-Scholes model, I build it up from first principles by motivating the properties we’d like our simulation to have.
- All exercises were expanded with more detailed (and sometimes simpler) solutions and hints where they’d be most useful.
- I included a final visualization of the pricing formula to build intuition for how the calculation behaves in general and how each parameter impacts the final result.
- Being a video, a lot of the content includes significantly more color and exposition than the original.
The rest of this post covers my thoughts on this project.
Thoughts on Manim#
This was my first time using the Manim package, and I was reasonably impressed.
The usage of the codebase is mostly consistent and has some nice overarching themes surrounding how all the objects and functions interact with each other. This is much better than some popular Python packages (cough pandas cough).
Moreover, the community edition has pretty good documentation and a large collection of helpful examples to get started. There are some functions that remain undocumented, and I had to dig through the source code to get a handful of the animations working the way I wanted, but I admit some of my usage was a bit unorthodox.
Especially since this is a community effort that forked a one-man personal project, that’s quite incredible!
The very general animation mechanisms also seem extremely powerful. I made the mistake at first of treating this like a simple plotting library and writing ad-hoc code that would be used once and never looked at again.
The strengths of the library didn’t become clear until I started treating it as a much more integrated system that can animate properties of classes with arbitrarily complicated internal state.
Ultimately for Manim, the code and animations are the main product whereas in most other cases they’re more of a side consideration (e.g., research papers, supplementary figures in presentations, etc.).
Video production is insanely intensive#
This project took significantly more time than I had expected – I wasn’t tracking it precisely, but I believe it was easily over 100 hours of work.
As such, there are parts I wish I could have polished more or animated more extravagantly, but I’m happy overall with the end result.
Similarly, video production is much more computationally expensive than I’d realized. I’ve worked with large batches of video encoding in the past but usually left them running overnight or in the background. In this case, the encoding itself is often the bottleneck of the creative pipeline, so you feel every second of it.
On a moderately powerful consumer desktop, each end-to-end render of this video required:
- ~2 hours of render time from Manim1
- ~7 minutes of ffmpeg conversions
- ~18 minutes for DaVinci Resolve to export the final timeline into a video
Two and a half hours of waiting time on a fresh run is enormous! I had to do this several times in the final editing process to make sure everything was to my liking.
DaVinci Resolve’s Linux support is finicky#
This was also the first time I ran DaVinci Resolve fully on Linux, which is a bit of a pain.
Their Linux release requires a very recent version of Nvidia’s proprietary driver to run, which was a bit of a surprise. Other GPUs (AMD, integrated, etc.) are simply not supported.
It also didn’t support my distro perfectly, asking for impossible sets of dependencies, so I had to resort to an unofficial script to convert it into a package that could be installed properly.
On top of this, it doesn’t support most video codecs! Anything remotely common like MP4s are out the window because the official implementations carry licensing fees and Blackmagic Design doesn’t seem willing to allow free, open-source alternatives.2
This is why my workflow ended up including an ffmpeg conversion step. I had to convert Manim’s video output into the Avid DNxHR LB codec.
This is apparently a “low-quality” professional codec, and it creates truly enormous files. Despite my video having perhaps ~10 minutes of actual moving animations, the raw files totalled ~37 GB in size (more than 8x the final render)!
Voiceover is difficult#
The workflow I settled on involved:
- Watching the rendered animations
- Writing a rough script of what I intended to talk about
- Reading this script and recording in Audacity (perhaps while looking at a key part of the relevant animation)
- Aligning the timing of the animations and voiceover in post
I think this is how most of these voiceovers get produced, but I’m more used to doing this sort of thing in front of a live audience, so it wasn’t the most natural process.
There is a Manim Voiceover plugin that lets you add voiceovers directly into the rendered Manim animation. However, it didn’t seem particularly common, suggested prototyping with text-to-speech engines, and required some extra Manim classes, so it didn’t seem worth the effort.
Indeed, I’d done some video editing in the past, so I thought I would prefer the extra control of doing all the post-production myself.
Final results (October 2025)#
My entry ended up receiving a 7.0/9 score (“better than most” in the scoring guidelines) and rank #28, which I’m quite happy with. This corresponds to the same score as the top ~10% of submissions!3
All the feedback is available at https://some.3b1b.co/entries/82642755-778b-4529-ae58-0b2c7f9175c1, and some of the nicest reviews include:
8.9/9.0: “I have only reviewed a handful of videos, but this is the first video that comes across trying to actually teach the math. The way that you teach is great and I appreciate the thoughtful hints. The animations at the end added a lot of intuition and made me realize that time and variance are kind of the same! At points it could have been helpful to additionally write out what symbols/constants stand for, but jumping back a little bit in the video solved it for me. I hope you make more videos in the future. I think it is very difficult to explain this topic better than you did.”
8.5/9.0: “The presentation, visualization, and theme are great. It really teaches the basics of option prices. I would’ve liked an asterisk on Ed Thorp, and another one about the differences between model and reality (like why the formula shouldn’t be applied blindly). It would be nice to have a follow up video on hedging but perhaps that’s not as easy to explain for a general audience (i am not really sure). Thanks for the great video!”4
8.5/9.0: “This is an excellent video for those who wonder about quantitative formulas but are yet to see the probability and analysis that lies underneath it all. I appreciate how thorough you were with formulating the cfd and pdf problems. And I appreciate even more how you strongly emphasized the need to set a problem solving technique by simulating and iterating to an analytic solution, absent of the industry. Given this knowledge, you also gently walked the audience through financial math definitions in terms of understanding BSM Pricing. These were the individual scores that led to your Ranking score: Motivation: 8 Clarity: 10 Novelty: 9 Memorability: 7
Please create more of your videos!”
7.9/9.0: “better than most. really well introduced and easy to understand. good graphics too. very nice. You made some assumptions about statistics competancy. would have been nice if you went a bit deeper into that to begin with.”
See also and references#
For more information, see the following resources.
- The original post, “A Simple Derivation of the Black-Scholes Option Pricing Formula” that I overhauled into this video.
- The Summer of Math Exposition website, which will undoubtedly have a huge collection of amazing math videos once the event is over.
- The Manim Community Edition website to learn more about the animation package.
- The Wikipedia article on the Black-Scholes model, which contains a lot more information on its traditional derivation, assumptions, and limitations.
Manim is not particularly well optimized, so render times can be quite long in general. Luckily, it is slightly faster on repeat runs since it caches some of the LaTeX, animations, etc. ↩︎
Realistically, this might get them into legal trouble, so it is a reasonable (but still painful) constraint. ↩︎
It is not particularly easy to pin down the exact percentile of a submission. In the full ordered list of ~350 video entries, my video is listed somewhere around #50 to #60, but all videos from around #30 to #60 scored exactly 7.0/9.0, due to the event’s rounding of scores to the nearest 0.1. Approximately the bottom half of all submissions are unranked because the event’s review algorithm occasionally filters out the bottom quartile to focus more on the best submissions. ↩︎
Funnily enough, I did have a brief discussion of Ed Thorp in the original script since he appears in my original text post, but I cut it for time and clarity. ↩︎