func (m *CurrencyPortfolio) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateAvailableFunds(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateAvailableWithdrawalFunds(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateBalance(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateCurrency(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateEquity(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateInitialMargin(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateMaintenanceMargin(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateMarginBalance(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this currency portfolio
package models
import (
	"encoding/json"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type CurrencyPortfolio struct {
	AvailableFunds *float64 `json:"available_funds"`
	AvailableWithdrawalFunds *float64 `json:"available_withdrawal_funds"`
	Balance *float64 `json:"balance"`
	Currency *string `json:"currency"`
	Equity *float64 `json:"equity"`
	InitialMargin *float64 `json:"initial_margin"`
	MaintenanceMargin *float64 `json:"maintenance_margin"`
	MarginBalance *float64 `json:"margin_balance"`
}