Share and Money Management 0.18devel
|
Class to handle quotes. More...
Public Member Functions | |
def | __str__ (self) |
Returns the content of this instance as string. More... | |
Public Member Functions inherited from smm.objects.SMMBaseObject | |
def | __init__ (self, **kwargs) |
Initialise the instance and set attributes optionally. More... | |
def | __repr__ (self) |
Returns the representation of this object as string. More... | |
def | update (self, **kwargs) |
Update instance arguments. More... | |
def | add2db (self) |
Add an object to the database. More... | |
Static Public Member Functions | |
def | get (date=None, id=None, share=None) |
Query DailyQuote objects. More... | |
def | getCount () |
Returns the number of daily quotes. More... | |
def | getLast (share, currency=None) |
Returns the latest DailyQuote for a share. More... | |
Static Public Attributes | |
dictionary | arguments |
string | psTopic = "smm.dailyquote" |
id = Int(default=AutoReload, primary=True) | |
Unique ID for each object. More... | |
share_id = Int() | |
Property to store the ID of the referred Share object. More... | |
share = Reference(share_id, Share.id) | |
Reference to the Share object More... | |
exchange_id = Int() | |
Property to store the ID of the referred Exchange object. More... | |
exchange = Reference(exchange_id, Exchange.id) | |
Reference to the Exchange object More... | |
currency_id = Int() | |
Property to store the ID of the referred Currency object. More... | |
currency = Reference(currency_id, Currency.id) | |
Reference to the Currency object More... | |
open = Decimal() | |
Opening value of the share. More... | |
close = Decimal() | |
Closing value of the share. More... | |
high = Decimal() | |
Highest value of the day. More... | |
low = Decimal() | |
Lowest value of the day. More... | |
date = Date() | |
Day of quotation. More... | |
volume = Int() | |
Trade volume in shares. More... | |
source = Int() | |
Data source. More... | |
event = Unicode() | |
Event related to this quote. More... | |
Static Public Attributes inherited from smm.objects.SMMBaseObject | |
dictionary | arguments |
Set of argument names for keyword arguments. More... | |
encoding = sys.stdout.encoding or sys.getdefaultencoding() | |
Encoding of all character strings. More... | |
psTopic = None | |
Publish Subscribe Topic for this class. More... | |
id = None | |
Unique ID for each object. More... | |
Static Private Attributes | |
string | __storm_table__ = "t_dailyquote" |
Use given table to store all of this class inside. More... | |
Class to handle quotes.
def smm.objects.DailyQuote.__str__ | ( | self | ) |
Returns the content of this instance as string.
References smm.objects.DailyQuote.close, gui.dialogs.DlgTrade.currency, smm.objects.Share.currency, smm.objects.DailyQuote.currency, smm.objects.Position.currency, smm.objects.DailyQuote.date, smm.objects.Transaction.date, smm.objects.Share.exchange, smm.objects.DailyQuote.exchange, smm.objects.Transaction.exchange, smm.objects.DailyQuote.high, smm.objects.SMMBaseObject.id, smm.objects.Exchange.id, smm.objects.Currency.id, smm.objects.Share.id, smm.objects.DailyQuote.id, smm.objects.Transaction.id, smm.objects.Watch.id, smm.objects.Position.id, smm.objects.DailyQuote.low, smm.objects.DailyQuote.open, smm.objects.Position.open, gui.dialogs.DlgTrade.share, gui.dialogs.DlgShare.share, smm.objects.DailyQuote.share, smm.objects.Watch.share, smm.objects.Position.share, and smm.objects.DailyQuote.volume.
Referenced by smm.objects.SMMBaseObject.__repr__().
|
static |
Query DailyQuote objects.
There are three ways for querying objects:
id
returns a DailyQuote object or None
share
and/or date
Querying with share
and date
returns an DailyQuote object or None
.
The last two ways returns always a storm.store.ResultSet.
id | Returns a quote specified by the id. |
share | Returns quotes specified by share. |
date | Returns a quote specified by date. |
|
static |
Returns the number of daily quotes.
|
static |
Returns the latest DailyQuote for a share.
share | Querying for this Share object |
currency | Specify the currency for the DailyQuote |
|
staticprivate |
Use given table to store all of this class inside.
|
static |
Referenced by smm.objects.SMMBaseObject._setAttrs().
|
static |
Closing value of the share.
Referenced by smm.objects.DailyQuote.__str__().
|
static |
|
static |
Property to store the ID of the referred Currency object.
|
static |
Day of quotation.
Referenced by smm.objects.DailyQuote.__str__(), smm.objects.Transaction.__str__(), and smm.objects.Transaction.getHoldingPeriod().
|
static |
Event related to this quote.
It's more like a note ...
Currently supported events:
Adapt functions below to add a new event:
|
static |
Reference to the Exchange object
Referenced by smm.objects.DailyQuote.__str__().
|
static |
Property to store the ID of the referred Exchange object.
|
static |
Highest value of the day.
Referenced by smm.objects.DailyQuote.__str__().
|
static |
Unique ID for each object.
Referenced by smm.objects.Exchange.__str__(), smm.objects.Currency.__str__(), smm.objects.Share.__str__(), smm.objects.DailyQuote.__str__(), smm.objects.Transaction.__str__(), smm.objects.Watch.__str__(), smm.objects.Position.__str__(), smm.objects.SMMBaseObject._remove(), and smm.objects.Transaction.getVolume().
|
static |
Lowest value of the day.
Referenced by smm.objects.DailyQuote.__str__().
|
static |
Opening value of the share.
Referenced by smm.objects.DailyQuote.__str__(), smm.objects.Position.__str__(), smm.objects.Position.Close(), and smm.objects.Position.Open().
|
static |
Reference to the Share object
Referenced by smm.objects.Watch.__init__(), smm.objects.DailyQuote.__str__(), smm.objects.Watch.__str__(), smm.objects.Position.__str__(), gui.dialogs.DlgTrade._prepareBuy(), gui.dialogs.DlgShare._processInput(), gui.dialogs.DlgShare._setShare(), gui.dialogs.DlgShare._validateInput(), smm.objects.Position.getLastQuote(), smm.objects.Position.getPerf(), gui.dialogs.DlgTrade.OnUpdateExistingPosition(), gui.dialogs.DlgTrade.OnUpdateNewPosition(), smm.objects.Watch.remove(), and smm.objects.Position.split().
|
static |
Property to store the ID of the referred Share object.
|
static |
Data source.
|
static |
Trade volume in shares.
Referenced by smm.objects.DailyQuote.__str__().