finalynx.portfolio.envelope
ο
Module Contentsο
Classesο
Depending on the date, an envelope can be at a certain state (locked, heavily taxed, free, etc). |
|
Represents an investment envelope or account (e.g. PEA, Assurance Vie, β¦). |
|
Handy shortcut to quickly define a PEA (automatically sets 5-years locked). |
|
Handy shortcut to quickly define a PEE (automatically sets 5-years locked). |
|
Handy shortcut to quickly define a PEA (automatically sets 8-years taxed). |
|
Handy shortcut to quickly define a PER (locked until retirement). |
APIο
- class finalynx.portfolio.envelope.EnvelopeState[source]ο
Bases:
enum.Enum
Depending on the date, an envelope can be at a certain state (locked, heavily taxed, free, etc).
- UNKNOWNο
βUnknownβ
- CLOSEDο
βClosedβ
- LOCKEDο
βLockedβ
- TAXEDο
βTaxedβ
- FREEο
βFreeβ
- class finalynx.portfolio.envelope.Envelope(name: str, code: str, date_created: Optional[datetime.date] = None, date_unlock: Optional[datetime.date] = None, date_untax: Optional[datetime.date] = None, key: Optional[str] = None)[source]ο
Represents an investment envelope or account (e.g. PEA, Assurance Vie, β¦).
Initialization
This class represents any investment envelope or account (e.g. PEA, Assurance Vie, CTO, β¦) and can be used to
- Parameters:
name β The envelope name (can also act as the
key
if the key is not set), will be displayed in the console and webdashboardcode β The envelope name in a short version (recommended 3 characters), will be displayed when rendering each line to indicate each lineβs envelope.
date_created β Accepts a
date
object to indicate when this envelope was opened.date_unlock β Accepts a
date
object to indicate when this envelope will be unlocked. For instance, a PEA will be unlocked 5 years after creation as required by law.date_untax β Accepts a
date
object to indicate when this envelope will no longer have higher-than-usual tax rates. For instance, a French Assurance Vie is highly taxed for the first 8 years after creation date, and then changes to a better tax rate.key β If you want to set a different name here from Finaryβs name, set the Finary name in this
key
parameter. The fieldname
will be used when displaying the envelope in Finalynx.
- link_line(line: finalynx.portfolio.line.Line) None [source]ο
Method used by Line objects so that this instance has a reference to its children
- get_state(date: finalynx.portfolio.envelope.Envelope.get_state.date) finalynx.portfolio.envelope.EnvelopeState [source]ο
- Returns:
The state of the envelope at the specified
date
based on the instanceβs creation, unlock, and untax dates.
- static from_dict(dict: Dict[str, Any]) finalynx.portfolio.envelope.Envelope [source]ο
- class finalynx.portfolio.envelope.PEA(name: str, code: str, date_created: datetime.date, key: Optional[str] = None)[source]ο
Bases:
finalynx.portfolio.envelope.Envelope
Handy shortcut to quickly define a PEA (automatically sets 5-years locked).
Initialization
Declare a PEA (locked for 5 years) with:
- Parameters:
name β Name of your account.
code β Short name of your account (3 characters recommended).
date_created β A
date
instance of the account creation date.key β Optional, if you want to use a different name in Finalynx than in Finary. See
Envelope
βs documentation for additional details.
- class finalynx.portfolio.envelope.PEE(name: str, code: str, date_created: datetime.date, date_unlock: Optional[datetime.date] = None, key: Optional[str] = None)[source]ο
Bases:
finalynx.portfolio.envelope.Envelope
Handy shortcut to quickly define a PEE (automatically sets 5-years locked).
Initialization
Declare a PEE (locked for 5 years) with:
- Parameters:
name β Name of your account.
code β Short name of your account (3 characters recommended).
date_created β A
date
instance of the account creation date.date_unlock β A
date
instance of the account unlock date, defaults to 5 years.key β Optional, if you want to use a different name in Finalynx than in Finary. See
Envelope
βs documentation for additional details.
- class finalynx.portfolio.envelope.AV(name: str, code: str, date_created: datetime.date, key: Optional[str] = None)[source]ο
Bases:
finalynx.portfolio.envelope.Envelope
Handy shortcut to quickly define a PEA (automatically sets 8-years taxed).
Initialization
Declare an Assurance Vie (taxed for 8 years) with:
- Parameters:
name β Name of your account.
code β Short name of your account (3 characters recommended).
date_created β A
date
instance of the account creation date.key β Optional, if you want to use a different name in Finalynx than in Finary. See
Envelope
βs documentation for additional details.
- class finalynx.portfolio.envelope.PER(name: str, code: str, date_created: datetime.date, date_retirement: datetime.date, key: Optional[str] = None)[source]ο
Bases:
finalynx.portfolio.envelope.Envelope
Handy shortcut to quickly define a PER (locked until retirement).
Initialization
Declare a PER (locked until retirement) with:
- Parameters:
name β Name of your account.
code β Short name of your account (3 characters recommended).
date_created β A
date
instance of the account creation date.date_retirement β A
date
instance of your expected retirement date.key β Optional, if you want to use a different name in Finalynx than in Finary. See
Envelope
βs documentation for additional details.