The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Finance::GeniusTrader::Systems -

DESCRIPTION

Trading systems are systems that decide what to buy and sell at which prices and so on.

A system will propose buy/sell orders. The day after, those orders will be either cancelled or confirmed. If the order is confirmed, then a position is considered open. An open position will then be managed by a close strategy.

$system->long_signal($calc, $i) =item $system->short_signal($calc, $i)

The system can generate 2 signals (buy or sell). A signal is an intent to buy or sell. Those functions should be overriden by the specific system.

$system->set_long_signal()
$system->set_short_signal()

Facility function to set which signal is used to generate buy/sell signal. They are meant to be used in initialize only if long_signal and short_signal are not overriden.

$system->precalculate_all($calc) =item $system->precalculate_interval($calc, $first, $last)

If you run a system on a long period of time you may want to precalculate all the indicators in order to benefit of possible optimizations. This is the role of those 2 functions.

$system->default_order_factory()

Return an object OrderFactory that can be used if no other objects was to be used.

Functions to manage a repository of systems

  Finance::GeniusTrader::Systems::get_registered_object($name);
  Finance::GeniusTrader::Systems::register_object($name, $object);
  Finance::GeniusTrader::Systems::get_or_register_object($name, $object);
  Finance::GeniusTrader::Systems::manage_object(\@NAMES, $object, $class, $args, $key);
Finance::GeniusTrader::Systems::Module->new($args)

Create a new Systems with the given arguments. $args is optional.