The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Finance::GeniusTrader::List - List of symbols (shares)

DESCRIPTION

This package provide some simple functions to work with a list of symbols.

Example

Create an empty Finance::GeniusTrader::List object : my $list = Finance::GeniusTrader::List->new();

Load data from a list of symbol : $list->load("/bourse/listes/us/nasdaq");

Add a symbol in a list : $list->add("GeniusTrader");

Remove a symbol in a list : $list->remove("GeniusTrader");

Save list in a file : $list->save("/bourse/listes/us/nasdaq");

Find how many symbols are in a list : $list->count();

Get symbol number $i : $list->get($i);

Functions

$list->get($i)

Get symbol number $i.

$list->add("symbol")

Add a symbol in a list.

$list->remove($i)

Remove the symbol number $i.

$list->count()

Find how many symbols are in the list.

$list->load("list_of_symbol.txt")

Load data from a list of symbol.

Supports comments in loaded files. Comments start
with a # and continue to end of line.

Blank lines and lines with only white space are ignored.

Lines may also have data and a trailing comment. A comment is
separated from the data by whitespace.

The data need can be indented too.

examples:

  V considered as column 1 of the line
  # a comment line
  AAPL # added to file on 25apr07
  # MSFT # no longer a growth company
      ADPI   # this one is indented with comment
$list->save("list_of_symbol.txt")

Save list in a file.