finalynx.portfolio.envelope

Module Contents

Classes

EnvelopeState

Depending on the date, an envelope can be at a certain state (locked, heavily taxed, free, etc).

Envelope

Represents an investment envelope or account (e.g. PEA, Assurance Vie, …).

PEA

Handy shortcut to quickly define a PEA (automatically sets 5-years locked).

PEE

Handy shortcut to quickly define a PEE (automatically sets 5-years locked).

AV

Handy shortcut to quickly define a PEA (automatically sets 8-years taxed).

PER

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 webdashboard

  • code – 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 field name will be used when displaying the envelope in Finalynx.

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.

to_dict() Dict[str, Any][source]
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.