I’m currently training in Python for market finance, and I’m practicing through small personal projects.
Recently, I built a simple put–call parity check to validate no-arbitrage consistency between call and put prices.
The screenshot shows the script output:
the parity holds (OK = True) and the difference is near zero, which confirms the prices are coherent within a numerical tolerance.
I recently created a GitHub to share these projects: https://lnkd.in/dNxa46cm
Next step: pricing a simple autocall product using Monte Carlo simulation.
#Python#Derivatives#Options#BlackScholes#Pricing
Most game-style physics in tutorials looks intimidating.
But when you strip it down, it’s just small pieces of math stacked in the right order.
I built a tiny particle engine in Python to prove this to myself.
Not a course. Not a framework. Just 6 standalone micro-scripts.
Each script changes exactly one variable:
movement
gravity
friction
bounce
collisions
glow
You don’t “watch” this — you open a file, change a number, and immediately see what breaks or improves. That feedback loop teaches faster than any 3-hour lecture.
By the final stage, you end up with a reusable explosion / particle system you actually understand instead of copy-pasting blindly.
If you’ve ever wanted to add real visual polish to a Python project without diving into heavy engines, this is the shortest path I’ve found.
👇 Link in first comment
#python#gamedev#pygame#learnbydoing#softwareengineering
🌳 Turning Code into Nature – Simple Tree with Fruits using Python Turtle 🌳
I created a minimalistic tree simulation using Python Turtle, exploring the intersection of recursion, randomness, and graphical representation.
Features of this project:
🌿 Recursive branch generation: Each branch splits into smaller branches automatically, simulating a natural tree structure.
🍃 Leaves and fruits: Randomly generated green leaves and red fruits make the tree visually appealing.
🎨 Clean visual design: Sky-blue background and simple aesthetic for a minimal yet realistic look.
🧠 Algorithmic thinking practice: Recursion and randomness were used to model natural growth patterns.
This project helped me apply programming logic to creative visualization, combining computer science concepts with artistic expression.
#Python#TurtleGraphics#Recursion#CreativeCoding#DataVisualization#CodingMeetsNature
🚀 Day-55 of #100DaysOfCode
📊 NumPy Practice – Row & Column Operations
Today I practiced performing row-wise and column-wise operations on matrices using NumPy.
🔹 Concepts Practiced:
✔ 2D NumPy arrays
✔ np.max() with axis
✔ Matrix handling
✔ Vectorized computations
🔹 Key Learning:
Understanding the axis parameter is very important in NumPy:
axis=0 → column-wise
axis=1 → row-wise
NumPy makes matrix operations simple and efficient compared to traditional loops.
Building strong fundamentals in numerical computing 💡🔥
#Python#NumPy#MatrixOperations#DataScience#100DaysOfCode#LearnPython#CodingPractice#PythonDeveloper
I built SpiderTrace to help visualize how Pauli errors (X and Z) propagate through quantum stabilizer circuits using ZX diagrams.
What it does:
- Traces error propagation through Hadamard and CNOT gates
- Generates step-by-step ZX diagrams showing how errors move
- Includes an interactive circuit builder to experiment with custom circuits
Why I built it:
While learning quantum error correction and ZX calculus, I realized textbook equations were not enough. I needed to see how errors spread through circuits. SpiderTrace lets me do just that.
What I learned:
- Pauli error propagation rules in stabilizer circuits
- ZX calculus and diagrammatic reasoning
- How to structure a clean Python package with interactive visualization
This tool is useful for anyone studying quantum error correction who wants to see error propagation in action. I’m planning to expand it to include Y errors and more Clifford gates.
GitHub: https://lnkd.in/dTsW7K9c#QuantumComputing#ErrorCorrection#ZXCalculus#OpenSource#Python
Sharing a Python implementation for 2D natural convection in a square cavity using a finite volume framework and PISO based pressure-velocity coupling.
The solver includes:
• Linear upwind convection with flux limiting
• Implicit diffusion treatment
• Adaptive/fixed time stepping options
• Streamfunction and Nusselt number evaluation
• Sparse pressure Poisson solver with LU factorization
Repository: https://lnkd.in/dPN_C6h2
The code is intended for learning, testing numerical schemes, and as a base for further CFD development and validation studies.
Showcasing my Runge-Kutta method Python solver part 2: Series Chemical Reactions.
Last week, I laid the mathematical foundations of a proprietary 4th order Runge-Kutta (RK4) ODE solver from first principles. This week, I modified the architecture of the Runge-Kutta method ODE solver to handle systems of multiple, coupled differential equations.
The goal? To be able to model the series chemical reaction.
A->B->C.
For this system, we are modeling the transient concentration profiles of a reactant CA decaying into an intermediate CB, which subsequently decays into a final product CC, governed by the rate constants:
k1 = 0.1 * min^(-1) and k2 = 0.05 * min^(-1)
The tricky part was finding out how to pass three separate differential equations into the solver. The solution I came up with was mapping the scalars into a vector space via a vectorization approach using numpy arrays. A very cool thing about vectorization is that Python can calculate very large sequences of data all at once using vectors. This is much faster than a for loop which is computationally more expensive and much slower.
My proprietary python rk4 method solver produced the exact same results obtained for the analytical solution for all three species CA, CB, and CC after t=50 minutes.
Stay tuned, next week I'll be showcasing another custom Python module for Chemical Engineering applications. 🧪+🐍+💻
Check out the demo video below.
#chemicalengineering#python#pythondevelopment#algorithm#chemicalindustry#deepwork#mathematics#mathematicalmodeling#opentowork#chemicalengineer
I recently built an N-body problem simulator in C++ and visualised it using Python (matplotlib, tkinter). The N-body problem is a classic example of chaotic behaviour; tiny changes in initial conditions can lead to wildly different outcomes.
For this simulation, I used 3 bodies in a 2D space and compared two numerical integration methods (Euler’s method and Runge-Kutta RK4) with the exact same initial conditions at t = 0.
At first, the two systems evolve almost identically. However, the effects of the numerical accuracy (or inaccuracy) of the methods start becoming visible after a while.
Euler’s method is the first to have the planets drift apart. The planets don’t slingshot away; they simply drift apart slowly, until the gravitational influence of the other bodies becomes negligible. In this simulation, they end up isolated… though perhaps, given enough time, they might meet again, the timespan just isn’t long enough to capture that.
RK4, on the other hand, keeps the planets in a “dance” much longer. But, as all good things do, it eventually ends. Planet 1 and Planet 3 approach each other very closely, reaching near infinite accelerations (bounded only by the limits of C++’s double data type), and effectively slingshot each other far away. Possibly, a fault in my simulation where I assume point masses instead of spherical or circular masses. Quickly, all three planets are left alone, just like in the Euler system, though their paths to isolation were very different.
The smallest of differences, compounded by slight numerical inaccuracies, eventually lead to completely different outcomes in the two systems, much like a butterfly flapping its wings.
Link to repo: https://lnkd.in/eAuyzexS#NBodyProblem#ChaosTheory#NumericalSimulation#CPlusPlus#Python#Matplotlib#RungeKutta#EulerMethod#PhysicsSimulation#ComputationalPhysics#ScientificComputing#DynamicalSystems#Chaos#Coding#Programming#STEM#DataVisualization#Animation#Tech#Engineering#Astrophysics
Daily Engineering Practice — Day 24: Two Pointers (Sorted Array — Two Sum II)
Focus:
• LeetCode 167 — Two Sum II
• Two Pointers pattern on sorted arrays
• Conditional pointer movement based on target comparison
Key Insight:
• Sorted arrays allow linear-time search:
- Move left pointer if current sum < target
- Move right pointer if current sum > target
- Stop when current sum == target
Outcome:
• Dry run and tracing table completed correctly
• Implemented in Python using in-place pointers
• Two Pointers pattern understanding reinforced for interviews
Code / Practice:
GitHub → https://lnkd.in/du4FcjyK#DSA#LeetCode#TwoPointers#SoftwareEngineering#DailyPractice
Beauty of mathematical language to describe even most complex environment.
You need to have ability for abstract thinking and formulating general problems, to be able use all mathematical reasoning for solving practical live problems
However like each language not practised on daily basis, now I can admire only main content and LaTeX mathematical formulas but without detailed follow up of each step.
Nevertheless logical reasoning and formulating general problems with detailed root causes analysis, where "real problem to solve" exists stayed with me till today in business life.
📢 I’ve just released a new version of my lecture notes “Monte Carlo methods and stochastic simulations: from integration to an
approximation of SDEs”
Compared to the February 2024 edition:
- Revised Chapter 2 (deterministic quadrature rules for multidimensional Lebesgue integrals): added proof of lower error bounds in the Information-Based Complexity framework
- Revised Chapter 4 - added proof of lower error bound for an arbitrary deterministic algorithm in the Lipschitz class of right-hand side functions
- Extended parameter estimation & forecasting chapter: added a conditional least squares content
and more 😊
#MonteCarlo#StochasticProcesses#SDE#NumericalAnalysis#Probability#OptionPricing#Python#AppliedMathematics
I couldn’t sit still after reading all those Hawking — so I built simple something work well.