LAST UPDATED:

January 24, 2022, 1:19:44 PM

PORTFOLIO function

MNEMONIC:

PF

Construct and edit an arbitrary number of asset portfolios, based on live inspections of known addresses.

TABLE OF CONTENTS

  1. SUMMARY
  2. DISAMBIGUATION
  3. SYNTAX
  4. USAGE
  5. CHAINING
  6. RELATED FUNCTIONS

1. SUMMARY

The PORTFOLIO (or PF) function displays a summary of asset balances and other key information at a glance. It is a core function that allows users to assess the total value of their various positions in one place. PORTFOLIO works by extracting real-time balances from blockchain addresses and applying external price data to value positions. Value will therefore adjust automatically if funds are sent or received, or if market prices rise or fall. The function supports an arbitrary number of user-defined portfolios, each of which can reference multiple addresses across any supported network. Portfolios are constructed using read-only public blockchain data; custody is not a requirement and therefore PORTFOLIO can support third-party or watch-only addresses. The primary visualization is a table format with standard controls for sorting, searching, currency and update settings.

2. DISAMBIGUATION

  • PORTFOLIO is not used for naming specific crypto addresses. (see LABEL)
  • PORTFOLIO is not used for following price changes of a directory of arbitrary assets. (see MARKET)

3. SYNTAX

PORTFOLIO | PF      .NEW(portfolio_name: text)      .EDIT(portfolio_name: portfolio)      .INSERT(label: label, portfolio_name: portfolio)      .REMOVE(label: label, portfolio_name: portfolio)      .SETDEFAULT(portfolio_name: portfolio)      .ENABLE(asset: asset, portfolio_name: portfolio)      .DISABLE(asset: asset, portfolio_name: portfolio)

4. USAGE

PORTFOLIO (or it's mnemonic PF) is most commonly used without subfunctions to view a specific Portfolio. PORTFOLIO subfunctions NEW and EDIT are used to create and edit existing portfolios. The subfunctions INSERT and REMOVE, ENABLE and DISABLE are used to add and remove assets and labelled addresses from consideration. SETDEFAULT is used to designate a specific portfolio as the default portfolio.

PORTFOLIO(MY_EXAMPLE_PORTFOLIO)

This command will display the specified portfolio.

screenshot

Here you can see a summary of asset balances and other key information at a glance. Columns include asset icon and name, current market price, total balance, and position value. All columns can be sorted alphabetically or numerically (depending on type). The rows can be searched using the search box at the top right.

The Total Value is the sum of all of the values of the positions in the portfolio, converted to the user's preferred currency (e.g. USD, GBP, EUR, JPY, CHF, ETH).

NEW subfunction

The NEW subfunction creates a new portfolio. When you first load the application, there will already be an empty portfolio called 'DEFAULT' ready for you to use. You can create additional portfolios using the NEW subfunction.

PORTFOLIO.NEW(MY_EXAMPLE_PORTFOLIO)

This creates a new portfolio, using the first argument provided as the name (in this case 'MY_EXAMPLE_PORTFOLIO').

screenshot

The portfolio is currently empty because it does not refer to any crypto addresses. We need to add a labelled address before the portfolio can show any further information.

Important: An address is the term generally used in the crypto industry to describe a unique entry in a public ledger. One could think about an address as a container for one or more crypto assets. An address (or hereafter often referred to as 'crypto address') is conceptually similar to an individual's bank account number, except that it is trivial for an individual to create an arbitrary number of crypto addresses, all of which are spendable by the individual. For more information on the technical underpinnings and/or cryptography behind crypto addresses we recommend reading this or this.

Using PORTFOLIO NEW without providing a name argument will open the Function Form to help build and execute the intended command.

screenshot

Once the portfolio name has been inputted, the Function Form gives us a correctly formatted command.

Pressing INSERT pastes the command to the Command Line, ready for execution.

EDIT subfunction

The EDIT subfunction opens up the EDIT Modal for a portfolio. This is used to define the addresses and assets within as well as preferences for display.

PORTFOLIO.EDIT(MY_EXAMPLE_PORTFOLIO)

screenshot

Using PORTFOLIO.EDIT without providing an existing portfolio name as an argument will open the Function Form. The Function Form will help you to construct your command ready for execution.

The Name field denotes the user-assigned name of the portfolio. This can be changed at any time.

The 'Set As Default Portfolio' checkbox, if ticked, will assign this portfolio as the default. The default portfolio will always be used by functions or subfunctions that expect a portfolio as an argument but don't receive one. Note that there can only be one default portfolio assigned at any time.

The 'Show Empty Balances' checkbox, if ticked, will force all enabled assets to occupy a row in the portfolio table, regardless of whether any amount of that assets exist in the portfolio addresses.

Enabled Addresses

The 'Enabled Addresses' section is used to pick which crypto addresses are used as constituents of the portfolio. PORTFOLIO works by extracting real-time balances from crypto addresses and applying external price data to value positions. Value will therefore adjust automatically if funds are sent or received, or if market prices rise or fall. A single portfolio can reference multiple addresses across any supported network. Portfolios are constructed using read-only public blockchain data; custody is not a requirement and therefore PORTFOLIO can support third-party or watch-only addresses.

A new portfolio will, by default, have no enabled addresses. Users need to go through the 'Enabled Addresses' list and enable the addresses the want to include as constituents of the portfolio. They do this by ticking the checkboxes.

screenshot

Once ticked, all enabled assets that exist at that address will be included in the portfolio, and in related calculations. In the case where multiple assets exist at the same address (e.g. Ethereum's ERC-20 tokens as well as native ETH), all supported assets will be included in the portfolio when the address is picked.

Important: Important: Only the crypto addresses that have already been registered to the system (aka 'labelled') appear in the Enabled Addresses list. You can easily do this using the LABEL command.

Hitting 'Save' returns to an updated portfolio view.

screenshot

The portfolio now shows all the balance and price data of the included addresses, in real time. As with all tables in Vektor, all columns can be sorted. Here the table is sorted by position value; largest first.

There are 2 primary views to this portfolio table; Assets view and Addresses view, accessible via the tabs above the table data.

screenshot

The ASSETS view (shown above) aggregates the portfolio by asset. That is, if the same asset exists in several of the selected constituent addresses, all the fragmented amounts of the same asset will be rolled up into a single row of the portfolio table. This view is useful for abstracting away the various crypto addresses and focusing on the total value of each asset investment.

The ADDRESSES view (shown below) has no such aggregation. In this case, every distinct combination of constituent crypto address and asset will occupy its own row of the table. As such, if the same asset exists in several selected crypto addresses (for instance, ETH deposited in various Ethereum addresses to pay for gas) then these amounts will each occupy their own row in the table. An additional column showing Address name will make clear where each asset amount is present. This view is useful for understanding at the base level where specifically all assets are currently held.

screenshot

Enabled Assets

The 'Enabled Assets' section is used to show/hide certain assets in your portfolio(s) depending on your preferences. Only enabled assets will be included as constituents of the portfolio, even if these assets exist in some amount within the Enabled Addresses (see above). In other words, it's not enough for an asset to be held in an 'enabled address'; it must also be an 'enabled asset' to be visible. By default, all supported assets are enabled in a new portfolio.

screenshot

Important: Note: For a list of supported assets, use the MARKET command or visit the 'Vektor supported networks & assets' page

Sometimes, new crypto projects try to bootstrap their launches by distributing their newly-created assets via so-called 'airdrops', where all holders of an existing asset (e.g. ETH) get free credits of this new asset to their existing crypto addresses. In this example, your portfolio assets view may suddenly include a new row that you don't want to track. You can remove this asset from the portfolio by un-ticking it on the Enabled Assets list in the PORTFOLIO EDIT modal.

screenshot

Use the search box to quickly isolate a specific asset from the Enabled Assets list, and un-tick it.

screenshot

Hitting 'Save' returns to an updated portfolio view, now excluding OMG (despite it existing in one of the constituent addresses).

screenshot

Another usage for the Enabled Assets list, if used in conjunction with the Show Empty Balances setting, would be to construct a watch list / wish list of assets, including them in the portfolio to monitor price changes despite them contributing nothing to the Total Value of the portfolio.

Each portfolio in Vektor is unique and can possess a distinct set of parameters for Name, Show Empty Balances, Enabled Addresses, and Enabled Assets.

INSERT subfunction

The INSERT subfunction adds a crypto address for inclusion into an existing portfolio. It is a shortcut to quickly enabling labelled crypto-addresses in a portfolio without needing to use the PORTFOLIO EDIT modal.

To correctly use PORTFOLIO.INSERT, you need to specify both a labelled address and a portfolio name as arguments.

PORTFOLIO.INSERT(DEFI1, MY_EXAMPLE_PORTFOLIO)

This command will add the labelled address DEFI1 to the existing portfolio MY_EXAMPLE_PORTFOLIO.

Important: Important: Only the crypto addresses that have already been registered to the system (aka 'labelled') appear in the Enabled Addresses list. You can easily do this using the LABEL function.

Using PORTFOLIO.INSERT is a faster way to add/enable addresses for inclusion in portfolios, so long as all the necessary information is provided to the subfunction. Partially providing arguments (e.g. specifying the crypto address but not the portfolio name) will open the EDIT modal instead, where the same operation can otherwise be performed (see 'Enabled Addresses' under EDIT subfunction).

REMOVE subfunction

The REMOVE subfunction removes a crypto address from an existing portfolio. It is a shortcut to quickly disabling labelled crypto-addresses in a portfolio without needing to use the PORTFOLIO EDIT modal.

To correctly use PORTFOLIO REMOVE, you need to specify both an address_name and a portfolio_name as arguments.

PORTFOLIO.REMOVE(DEFI1, MY_EXAMPLE_PORTFOLIO)

This command will remove the labelled address DEFI1 from the portfolio called MY_EXAMPLE_PORTFOLIO.

Important: Important: Only the crypto addresses that have already been registered to the system (aka 'labelled') appear in the Enabled Addresses list. You can easily do this using the LABEL function.

Using PORTFOLIO.REMOVE is a faster way to remove/disable addresses for exclusion in portfolios, so long as all the necessary information is provided to the subfunction. Partially providing arguments (e.g. specifying the crypto address but not the portfolio name) will open the EDIT modal instead, where the same operation can otherwise be performed (see 'Enabled Addresses' under EDIT subfunction).

ENABLE subfunction

The ENABLE subfunction unhides a specific asset for a specific portfolio. Only enabled assets will be included as constituents of the portfolio, even if they exist in some amount within the Enabled Addresses (see EDIT subfunction). By default, the supported assets are DAI, ETH, USDT, USDC and WBTC.

To correctly use PORTFOLIO.ENABLE, you need to specify both an asset_name and a portfolio_name as arguments.

PORTFOLIO.ENABLE(OMG, MY_EXAMPLE_PORTFOLIO)

This command will enable the asset known as OMG (OmiseGO) for the portfolio called MY_EXAMPLE_PORTFOLIO. This means any OMG asset amounts that exist within any of the enabled crypto-addresses will appear in the portfolio view of MY_EXAMPLE_PORTFOLIO, and be counted in aggregate calculations.

Using PORTFOLIO.ENABLE is a faster way to enable assets for inclusion in portfolios, so long as all the necessary information is provided to the subfunction. Partially providing arguments (e.g. specifying the asset but not the portfolio name) will open the EDIT modal instead, where the same operation can otherwise be performed (see 'Enabled Assets' under EDIT subfunction).

DISABLE subfunction

The DISABLE subfunction hides a specific asset for a specific portfolio. Any disabled assets will be excluded as constituents of the portfolio, even if they exist in some amount within the Enabled Addresses (see EDIT subcommand). By default, the supported assets are DAI, ETH, USDT, USDC and WBTC.

To correctly use PORTFOLIO.DISABLE, you need to specify both an asset_name and a portfolio_name as arguments.

PORTFOLIO.DISABLE(CRV,MY_EXAMPLE_PORTFOLIO)

This command will disable the asset known as CRV (Curve) for the labelled portfolio MY_EXAMPLE_PORTFOLIO. This means any CRV asset amounts that exist within any of the enabled crypto-addresses will not appear in the portfolio view of MY_EXAMPLE_PORTFOLIO, nor be counted in aggregate calculations.

Using PORTFOLIO.DISABLE is a faster way to disable assets for inclusion in portfolios, so long as all the necessary information is provided to the subfunction. Partially providing arguments (e.g. specifying the asset but not the portfolio name) will open the EDIT modal instead, where the same operation can otherwise be performed (see 'Enabled Assets' under EDIT subfunction).

SETDEFAULT subfunction

The SETDEFAULT subfunction assigns an existing portfolio to be used as a default. When functions expect a portfolio_name but one is not supplied, the function will use whichever portfolio is set as the default. This makes sure that functions are always able to execute in ambiguous situations.

PORTFOLIO.SETDEFAULT(MY_EXAMPLE_PORTFOLIO)

This will set the portfolio labelled "MY_EXAMPLE_PORTFOLIO" as the default portfolio.

Examples of functions that require a portfolio_name as an argument (and hence might use the default as a fallback) include PORTFOLIO SHOW, PORTFOLIO INSERT, PORTFOLIO REMOVE, PORTFOLIO ENABLE, and PORTFOLIO DISABLE.

There must always be at least one portfolio overall, and there must always be only one portfolio set as the default.

5. CHAINING

-