Bardo.Examples.Applications.Fx (Bardo v0.1.0)

View Source

Main setup module for the Forex (FX) trading experiment.

This module provides functions to configure and run FX trading simulations using neuroevolution to optimize trading strategies.

Summary

Functions

Run a Forex trading experiment with the given configuration.

Test the best trading agent from a completed experiment on out-of-sample data.

Functions

configure(experiment_id, population_size \\ 50, data_window \\ 5000, generations \\ 50)

@spec configure(atom(), pos_integer(), pos_integer(), pos_integer()) :: map()

Configure a Forex trading experiment.

Parameters:

  • experiment_id: Unique identifier for the experiment
  • population_size: Number of trading agents (default: 50)
  • data_window: Size of the data window for training (default: 5000)
  • generations: Number of generations to evolve (default: 50)

Returns the experiment configuration map.

run(experiment_id, population_size \\ 50, data_window \\ 5000, generations \\ 50)

@spec run(atom(), pos_integer(), pos_integer(), pos_integer()) ::
  :ok | {:error, any()}

Run a Forex trading experiment with the given configuration.

Parameters:

  • experiment_id: Unique identifier for the experiment
  • population_size: Number of trading agents (default: 50)
  • data_window: Size of the data window for training (default: 5000)
  • generations: Number of generations to evolve (default: 50)

Returns :ok if the experiment was started successfully.

test_best_agent(experiment_id, test_window_start \\ 5000, test_window_size \\ 1000)

@spec test_best_agent(atom(), pos_integer(), pos_integer()) :: map() | {:error, any()}

Test the best trading agent from a completed experiment on out-of-sample data.

Parameters:

  • experiment_id: ID of the completed experiment
  • test_window_start: Starting index for test data (default: 5000)
  • test_window_size: Size of the test data window (default: 1000)

Returns a map with test results.