| 1 | package Finance::GeniusTrader::Brokers::NoCosts; | ||
| 2 | |||
| 3 | # Copyright 2004 Oliver Bossert | ||
| 4 | # This file is distributed under the terms of the General Public License | ||
| 5 | # version 2 or (at your option) any later version. | ||
| 6 | |||
| 7 | use strict; | ||
| 8 | use vars qw(@NAMES @ISA); | ||
| 9 | |||
| 10 | use Finance::GeniusTrader::Brokers; | ||
| 11 | use Finance::GeniusTrader::Eval; | ||
| 12 | use Finance::GeniusTrader::Conf; | ||
| 13 | |||
| 14 | @NAMES = ("NoCosts[]"); | ||
| 15 | @ISA = qw(Finance::GeniusTrader::Brokers); | ||
| 16 | |||
| 17 | =head1 Finance::GeniusTrader::Brokers::NoCosts | ||
| 18 | |||
| 19 | =head2 Overview | ||
| 20 | |||
| 21 | This module will calculate no commissions or charges. | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | sub new { | ||
| 26 | my $type = shift; | ||
| 27 | my $class = ref($type) || $type; | ||
| 28 | my $args = shift; | ||
| 29 | my $self = {}; | ||
| 30 | |||
| 31 | return manage_object(\@NAMES, $self, $class, $self->{'args'}, ''); | ||
| 32 | } | ||
| 33 | |||
| 34 | =head2 $broker->calculate_order_commission($order) | ||
| 35 | |||
| 36 | Return the amount of money ask by the broker for the given order. | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | sub calculate_order_commission { | ||
| 41 | my ($self, $order) = @_; | ||
| 42 | return 0; | ||
| 43 | } | ||
| 44 | |||
| 45 | =head2 $broker->calculate_annual_account_charge($portfolio, $year) | ||
| 46 | |||
| 47 | Return the amount of money ask by the broker for the given year | ||
| 48 | according to the given portfolio. | ||
| 49 | |||
| 50 | =cut | ||
| 51 | |||
| 52 | sub calculate_annual_account_charge { | ||
| 53 | my ($self, $portfolio, $year) = @_; | ||
| 54 | return 0; | ||
| 55 | } | ||
| 56 | |||
| 57 | 1; |