# Accounts and investments

Accounts, the assets available to them, and investment selections.

## Account

```protobuf
message Account {
  string account_id = 1;
  Type type = 2;

  enum Type {
    UNKNOWN_TYPE = 0;
    TRADITIONAL_401K = 1;
    ROTH_401K = 2;
  }
}
```

## AccountInvestmentDetail

```protobuf
message AccountInvestmentDetail {
  AccountInvestmentSelectionType type = 1;
  int32 allocation_bps = 2;
  optional AssetMetadata asset_metadata = 3;
}
```

**References:** [AccountInvestmentSelectionType](/core-data-types/accounts-and-investments#accountinvestmentselectiontype), [AssetMetadata](/core-data-types/accounts-and-investments#assetmetadata)

## AccountInvestmentSelection

```protobuf
message AccountInvestmentSelection {
  AccountInvestmentSelectionType type = 1;
  optional string asset_uuid = 2;
  int32 allocation_bps = 3;
}
```

**References:** [AccountInvestmentSelectionType](/core-data-types/accounts-and-investments#accountinvestmentselectiontype)

## AccountInvestmentSelections

```protobuf
message AccountInvestmentSelections {
  string account_id = 1;
  repeated AccountInvestmentDetail account_investments = 2;
  repeated TrmInvestmentDetail trm_investments = 3;
  bool has_set_custom_investment_selections = 4;
}
```

**References:** [AccountInvestmentDetail](/core-data-types/accounts-and-investments#accountinvestmentdetail), [TrmInvestmentDetail](/core-data-types/accounts-and-investments#trminvestmentdetail)

## AccountInvestmentSelectionType

```protobuf
enum AccountInvestmentSelectionType {
  UNKNOWN_INVESTMENT_SELECTION_TYPE = 0;
  EMPLOYER_SELECTED = 1;
  BROKERAGE_WINDOW = 2;
  RETIREMENT_MORTGAGE = 3;
}
```

## AssetMetadata

```protobuf
message AssetMetadata {
  enum AssetClass {
    UNKNOWN_ASSET_CLASS_NAME = 0;
    BONDS = 1;
    EQUITIES = 2;
    TARGET_DATE_FUND = 3;
    CASH = 4;
  }

  enum AssetSuggestionType {
    UNKNOWN_CLASSIFICATION = 0;
    POPULAR = 1;
    OPTIONAL = 2;
    REQUIRED = 3;
  }

  string uuid = 1;
  string short_name = 2;
  string full_name = 3;
  string symbol = 4;
  AssetClass asset_class = 5;
  int32 allocation_bps = 6;
  optional int32 yield_bps = 7;
  optional int32 expense_ratio_bps = 8;
  optional Money value = 9;
  optional AssetSuggestionType classification = 10;
}
```

**References:** [Money](/core-data-types/common#money)

## TrmInvestmentDetail

```protobuf
message TrmInvestmentDetail {
  AssetMetadata asset_metadata = 1;
  int32 allocation_bps = 2;
}
```

**References:** [AssetMetadata](/core-data-types/accounts-and-investments#assetmetadata)

## TrmInvestmentSelection

```protobuf
message TrmInvestmentSelection {
  string asset_uuid = 1;
  int32 allocation_bps = 2;
}
```

## HoldingsPerformance

```protobuf
message HoldingsPerformance {
  Money gain_loss = 1;
  int32 gain_loss_bps = 2;
  Money paid_in_capital = 3;
  Money total_value = 4;
}
```

**References:** [Money](/core-data-types/common#money)

## DatedHoldingsPerformance

```protobuf
message DatedHoldingsPerformance {
  Date date = 1;
  HoldingsPerformance performance = 2;
}
```

**References:** [Date](/core-data-types/common#date), [HoldingsPerformance](/core-data-types/accounts-and-investments#holdingsperformance)