Stefan Petrov, Developer in Sofia, Bulgaria
Stefan is available for hire
Hire Stefan

Stefan Petrov

Verified Expert  in Engineering

Bio

Stefan has been fascinated by the potential of AI since high school. For the past several years, he’s been making a living as the primary developer of more than ten analytical products using R, Python, Mathematica, .NET, and Java. Recently, Stefans been focusing on operations research-type issues and using random forests, time series models, Keras, TensorFlow for neural nets, PyMC3, Stan for Bayesian models, and linear and MIP programming.

Portfolio

Freelance
Python, Machine Learning, Statistics, Reinforcement Learning...
Meta
Hack, PHP, JavaScript, Apache Airflow, Python, C++, React...
Transmetrics
Docker, TensorFlow, CPLEX, PostgreSQL, Python, R...

Experience

  • R - 7 years
  • Data Science - 7 years
  • Machine Learning - 6 years
  • Python - 6 years
  • Mathematical Modeling - 5 years
  • Time Series - 4 years
  • Python 3 - 4 years
  • F# - 2 years

Availability

Part-time

Preferred Environment

PostgreSQL, JetBrains, RStudio

The most amazing...

...thing I've coded was a successive approximation algorithm for the optimal trucking schedule. We used a combination of column generation and L1 relaxation.

Work Experience

Machine Learning Engineer

2019 - PRESENT
Freelance
  • Developed machine learning algorithms for stock price prediction, resulting in Sharpe ratios of 3.2. Used an ensemble of ML, neural net, and traditional forecasting mechanisms. Created and developed an API and data pipeline using Google Cloud.
  • Worked on the analysis of news processed through an NLP pipeline to FOREX rate change predictions.
  • Did prediction and optimization of required inventory levels for inventory stock levels with many item types (>30,000 SKU). Used ML classification and probabilistic programming combined with operational research techniques.
  • Estimated type and severity of mental diseases from self-reported surveys (using NLP and ML techniques). Collaborated with a specializing doctor of medicine (psychiatry).
  • Worked on spatio-temporal analysis of demographic data for income estimation on the fine-grained spatial scale (scale was different for different countries). Used particular spatio-temporal statistical techniques.
Technologies: Python, Machine Learning, Statistics, Reinforcement Learning, Generative Pre-trained Transformers (GPT), Natural Language Processing (NLP), Operations Research, Flask-RESTful, R, Julia, Artificial Intelligence (AI), Large Language Models (LLMs), Generative Artificial Intelligence (GenAI), Algorithms, NumPy, Data Structures, Machine Learning Operations (MLOps), PyTorch, Feature Engineering, Backtesting Trading Strategies, OpenAI, BigQuery, Google Analytics, Datasets

Senior ML Engineer

2022 - 2025
Meta
  • Worked on ads experimentation to validate changes to the ads delivery system, which drives over 95% of Meta's revenue.
  • Used machine learning (ML) and mathematical optimization. Increased the supply of the main (launchable) sub-platform of the team by 75%, leading to hundreds of millions of USD in incremental revenue enabled per half.
  • Improved the throughput of an exploratory subplatform by 250%, increasing customer decision velocity correspondingly without disrupting the "launchable" part of the platform. Used ML, optimization, and UX enhancements to achieve that.
  • Led an approved investment request for a headcount that was funded, bringing five additional headcounts over five years. The document proposed multiple ML and optimization-based platform improvements.
  • Created detailed technical design documents with scope for three HCs.
  • Performed alignment, technical design, requirement gathering, technical design, user feedback collection, user surveys, and more.
  • Conducted code reviews, bug-fixing, and data analysis for purposes of debugging, opportunity sizing, and validating early-stage project ideas and root cause analysis during incidents.
Technologies: Hack, PHP, JavaScript, Apache Airflow, Python, C++, React, Software Architecture, Software Engineering, Big Data, SQL, Apache Hive, Presto, Jupyter, Documentation, Artificial Intelligence (AI), Optimization Algorithms, Recommendation Systems, Full-stack Development, Large Language Models (LLMs), Cloud, Generative Artificial Intelligence (GenAI), AI Consulting, Algorithms, NumPy, Data Structures, Machine Learning Operations (MLOps), AI Algorithms, PyTorch, Feature Engineering, BigQuery, Marketing, Data Engineering, Dashboards, Agentic AI, Causal Inference, Distributed Systems, Machine Learning, Database Architecture, Datasets

Head of Research

2016 - 2022
Transmetrics
  • Worked on 1-3 projects as the key analytical contributor.
  • Used ML, statistical, and deep neural network techniques for forecasting demand time series.
  • Modeled and optimized problems transportation companies have, like routing, network design, and warehouse optimization, using ML, linear optimization, approximation algorithms MIP, CP, reinforcement learning, and probabilistic programming.
  • Analyzed and negotiated business requirements and project directions, considering the following: data availability, business requirements, feasibility, and technology to solve certain types of problems.
  • Performed code reviews, directed and facilitated the problem-solving process, read papers, and disseminated knowledge throughout the organization.
  • Worked on estimated time-of-return of rented assets, using survival analysis and other ML and statistical techniques.
  • Hired, interviewed, and mentored team members. Designed an interview loop and performance evaluation process.
Technologies: Docker, TensorFlow, CPLEX, PostgreSQL, Python, R, Mixed-integer Linear Programming, Constraint Programming, Deep Neural Networks (DNNs), Machine Learning, Statistics, Bayesian Statistics, Time Series Analysis, Team Leadership, Teamwork, IBM Watson, Artificial Intelligence (AI), Optimization Algorithms, Logistics, Route Optimization, Path Optimization, Generative Artificial Intelligence (GenAI), Algorithms, NumPy, Ubuntu, PyTorch, Feature Engineering, Causal Inference, Fintech, Datasets

Quantitative Developer

2016 - 2016
CommEq Asset Management
  • Developed an algorithmic trading system with Python. Refactored the codebase to use six times fewer Lines of Code. Changed up the Machine Learning algorithm in question with one, performing better on the backtests.
  • Performed some natural language processing work for news classification and tagging (multi-label classification problem), significantly improving on the currently used models. The measurement was Hamming-Loss.
  • Worked on portfolio rebalancing part using Convex Optimization techniques.
Technologies: R, MongoDB, Python, Generative Pre-trained Transformers (GPT), Natural Language Processing (NLP), Machine Learning, Time Series Analysis, Gradient Boosting, XGBoost, Convex Optimization, Artificial Intelligence (AI), Feature Engineering, Backtesting Trading Strategies, Quantitative Analysis, Trading

Quantitative Analyzer

2013 - 2016
Bwin.Party Digital Entertainment
  • Developed modules that determined the probabilities for events of interest (goals, points, and so on) and their prices (odds) for the sporting events, offered on the company sites. Used mostly Mathematica and F#.
  • Solved various BI questions (e.g., the impact of a new sports model release on revenue in that sport, customer classification, and others). Used ML and Statistical techniques, e.g. XGBoost classification, etc.
  • Revamped volleyball and a couple of other point sports models, boosting the P&L on them significantly. Used Numerical analysis algorithms, backtesting, and ML. Participated in basketball and tennis models, too.
  • Developed large parts of the currently used customer classification (dangerous or not, VIP or not, about to churn/not, and so on) models. Used Machine Learning, Deep Learning, and Probabilistic Programming Algorithms.
  • Handled pricing problems (pricing combos). Used Approximation algorithms for a nonlinear optimization problem for this.
  • Developed sports models libraries (directly deployed in production) and simple GUI clients (for Quality control by the traders) with F# and Mathematica.
Technologies: Microsoft SQL Server, Teradata, R, Mathematica, F#, Tableau, Business Intelligence (BI), Data Science, Data Analysis, Probability Theory, Numerical Programming, Machine Learning, SQL, RStudio Shiny, Dashboards, Feature Engineering

Quantitative Developer

2013 - 2013
Blue Edge Bulgaria | Evolution Capital Management
  • Developed high-frequency trading strategies, aimed at trading in Japan, using specialized versions of PCA, ML, and optimization.
  • Implemented the main approach via technical trading-trying to identify persistent regimes in the market, based on detecting correlated quantities in the electronic trading book.
  • Worked on the backtesting/trading platform (C#, MS SQL stack).
  • Developed with R/Python for EDA and prototyping and estimation of upper bound of strategy performance before trading complications such as latency and transaction costs are considered.
  • Researched about order book dynamics (e.g., the expected lifetime of bids).
Technologies: Microsoft SQL Server, R, Python, C#, Machine Learning, Mathematical Finance, Statistics, Time Series Analysis, Convex Optimization, Principal Component Analysis (PCA), Artificial Intelligence (AI), Feature Engineering, Backtesting Trading Strategies, Quantitative Analysis, Trading

Quantitative and Back-end Developer

2012 - 2012
Cayetano Gaming
  • Developed a slot game with a game designer who would specify the game logic, what type of bonuses and mini-games existed, and provided the vision of how the game should "feel." This is expressed in terms of volatility of payout, bonus structure, bonus frequency, etc. For example, a "chill" could pay out small amounts very often, while a suspense-filled game might have less frequent larger payouts.
  • Worked in a team that was responsible for writing game logic and developing in-house combinatorial optimizer in order to find suitable symbol distribution so that the game "feel" and expected payout properties are satisfied.
  • Wrote three games, one of which was novel in that there was some strategy involved on the player side. This required different pricing techniques.
  • Implemented an ad-hoc statistical analysis for roulette behavior.
Technologies: Java

Experience

High-frequency Backtesting Engine

I developed a backtesting engine for semi high-frequency trading (1 minute) in R. The trading system achieved a Sharpe ratio of 1.85 in backtesting. I used R, XGBoost, regularized linear models, and an interface in Shiny.

Education

2009 - 2012

Master's Degree in Mathematical Modeling in Economics

Sofia University - Sofia, Bulgaria

2008 - 2012

Bachelor's Degree in Computer Engineering

Nagoya Institute of Technology - Nagoya, Japan

2005 - 2009

Bachelor's Degree in Applied Mathematics

Sofia University - Sofia, Bulgaria

2007 - 2008

Certificate in Japanese Language Course

Tokyo University of Foreign Studies - Tokyo, Japan

Skills

Libraries/APIs

Scikit-learn, SciPy, NumPy, PyTorch, TensorFlow, Flask-RESTful, XGBoost, React

Tools

StatsModels, ARIMA, Mathematica, BigQuery, JetBrains, CPLEX, IBM Watson, Tableau, Apache Airflow, Jupyter, Google Analytics

Languages

Python, Python 3, R, SQL, F#, Wolfram, Julia, C#, Scala, Java, Hack, PHP, JavaScript, C++

Frameworks

RStudio Shiny, Apache Spark, .NET, Presto

Paradigms

Linear Programming, Constraint Programming, Business Intelligence (BI), Anomaly Detection

Platforms

Ubuntu, Jupyter Notebook, RStudio, Docker, Linux, Google Cloud SDK

Storage

PostgreSQL, Database Architecture, MongoDB, Teradata, Microsoft SQL Server, Apache Hive

Industry Expertise

Marketing

Other

Data Analytics, Algorithms, Applied Mathematics, Time Series Analysis, Forecasting, Linear Regression, Data Visualization, Graph Theory, Mathematical Modeling, Logistics, Time Series, Data Science, Machine Learning, Artificial Intelligence (AI), Optimization Algorithms, Route Optimization, Path Optimization, Recommendation Systems, Full-stack Development, Generative Artificial Intelligence (GenAI), Data Structures, Feature Engineering, OpenAI, Datasets, Data Reporting, Product Analytics, Project Leadership, Data Mining, Statistical Modeling, Neural Networks, Natural Language Processing (NLP), Software Development, SaaS, Dashboards, Mathematical Finance, Statistics, Bayesian Statistics, Supply Chain Optimization, Mixed-integer Linear Programming, Gradient Boosted Trees, Customer Segmentation, Generative Pre-trained Transformers (GPT), Large Language Models (LLMs), Cloud, AI Consulting, Machine Learning Operations (MLOps), Mathematics, AI Algorithms, Backtesting Trading Strategies, Data Engineering, Causal Inference, Distributed Systems, Quantitative Analysis, Fintech, Product Design, Spatial Analysis, Reinforcement Learning, Operations Research, Team Leadership, Teamwork, Gradient Boosting, Convex Optimization, Data Analysis, Probability Theory, Numerical Programming, Principal Component Analysis (PCA), Economics, Computer Engineering, Root Cause Analysis, Logistic Regression, Deep Neural Networks (DNNs), Recurrent Neural Networks (RNNs), Random Forests, Support Vector Machines (SVM), Clustering Algorithms, Stochastic Modeling, Hierarchical Clustering, Google Data Studio, Software Architecture, Software Engineering, Big Data, Documentation, Agentic AI, Trading

Collaboration That Works

How to Work with Toptal

Toptal matches you directly with global industry experts from our network in hours—not weeks or months.

1

Share your needs

Discuss your requirements and refine your scope in a call with a Toptal domain expert.
2

Choose your talent

Get a short list of expertly matched talent within 24 hours to review, interview, and choose from.
3

Start your risk-free talent trial

Work with your chosen talent on a trial basis for up to two weeks. Pay only if you decide to hire them.

Top talent is in high demand.

Start hiring