Soojal Kumar
Back to Projects

Aug 2024 - Dec 2024

GenAI Project - Genetic Algorithm Optimization Engine

Optimization engine for evolving trading strategies using genetic algorithms.

This project implements a genetic algorithm framework that evolves candidate strategies using selection, crossover, mutation, and elitism. It supports training/testing workflows, configurable experiments, JSON summaries, and fitness progression plots.

PythonGenetic AlgorithmsOptimizationMachine LearningNumPyMatplotlib

Real project asset

Evolution Loop

GenAI genetic algorithm fitness progress plot

Initial Population

Fitness Evaluation

Selection

Crossover

Highlight

Genetic Algorithm

Highlight

Strategy Optimization

Highlight

CLI Configuration

Highlight

Fitness Visualizations

Executive Summary

This project implements a genetic algorithm framework that evolves candidate strategies using selection, crossover, mutation, and elitism. It supports training/testing workflows, configurable experiments, JSON summaries, and fitness progression plots.

Problem Statement

Optimization problems often require exploring large solution spaces. This project applies evolutionary search to discover candidate trading rules and compare strategy behavior across generations.

What I Built

Configurable CLI

JSON experiment summaries

Fitness plots

Train/test split workflow

How It Works

A conceptual workflow showing how the project moves from input to processing and output.

Step 1

Historical Data

Step 2

Candidate Strategies

Step 3

Fitness Scoring

Step 4

Genetic Operators

Step 5

Best Strategy

Step 6

Test Evaluation

Architecture / System Design

A simplified system view of the major project components and how responsibilities connect.

Step 1

CLI Config

Step 2

GA Engine

Step 3

Fitness Function

Step 4

Experiment Runner

Step 5

JSON Summary + Plots

Technical Implementation

Algorithm

  • Selection
  • Crossover
  • Mutation
  • Elitism

Experimentation

  • Configurable CLI
  • Training/testing workflows
  • Repeatable parameter tuning

Data + Output

  • Historical financial data
  • JSON summaries
  • Fitness progression plots

Tools

  • Python
  • NumPy
  • Matplotlib

Screenshots & Visuals

Real project screenshots and outputs appear first. Where a project has no existing screenshots, the visuals are grounded diagrams or output previews based on the actual project structure.

GenAI genetic algorithm fitness progress plot
OutputReal project asset

Fitness Progress Plot

Actual output plot from the GenAI project showing optimization progress across generations.

Genetic algorithm evolution pipeline
WorkflowGenerated from project structure

Strategy Evolution Pipeline

Grounded pipeline diagram for the implemented population, fitness scoring, selection, crossover, mutation, and best-strategy workflow.

GenAI run summary JSON visual
OutputGenerated from project structure

JSON Summary Output

Structured experiment summary visual based on the project's generated run_summary.json output artifact.

Experiment Config Preview

{
  "population_size": 100,
  "mutation_rate": 0.05,
  "generations": 50,
  "best_fitness": "..."
}

Challenges & Solutions

Challenge

Large strategy spaces are difficult to search manually.

Solution

Used a genetic algorithm loop to evolve candidate strategies through repeated scoring and variation.

Challenge

Optimization experiments need visibility into parameter choices and outcomes.

Solution

Added CLI configuration, JSON summaries, and fitness progression visualizations.

Results / Impact

Demonstrates practical software engineering through modular structure, readable workflows, and clear technical documentation.

Shows ability to convert course and research concepts into working systems with real implementation constraints.