public class PythonPortfolioServiceStub extends PythonPortfolioService
objectMapper
Constructor and Description |
---|
PythonPortfolioServiceStub() |
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
getAvailableBalance()
Gets the balance available for trading of the entire System.
|
java.math.BigDecimal |
getAvailableBalance(java.lang.String strategyName)
Gets the balance available for trading of the specified Strategy.
|
java.util.Collection<java.lang.String> |
getBalances()
Gets the
CashBalances of the entire system. |
java.util.Collection<java.lang.String> |
getBalances(java.lang.String strategyName)
Gets the
CashBalances for the specified Strategy. |
java.math.BigDecimal |
getCashBalance()
Gets the Cash Balance of the entire System.
|
java.math.BigDecimal |
getCashBalance(java.lang.String strategyName)
Gets the Cash Balance of the specified Strategy.
|
java.math.BigDecimal |
getCashBalance(java.lang.String strategyName,
java.time.ZonedDateTime date)
Gets the Cash Balance of the specified Strategy on the specified Date.
|
java.math.BigDecimal |
getCashBalance(java.lang.String strategyName,
java.time.ZonedDateTime date,
NamedParam... namedParams)
Gets the Cash Balance on the specified Date by an arbitrary filter by aggregating all
relevant transactions.
|
java.math.BigDecimal |
getCashBalance(java.time.ZonedDateTime date)
Gets the Cash Balance of the entire System on the specified Date.
|
java.util.Collection<java.lang.String> |
getFxExposure()
Gets the Net FX Currency Exposure of all FX positions of the entire system.
|
java.util.Collection<java.lang.String> |
getFxExposure(java.lang.String strategyName)
Gets the Net FX Currency Exposure of all FX positions for the specified Strategy.
|
java.math.BigDecimal |
getMarketValue()
Gets the total Market Value of all non-FX Positions of the entire System.
|
java.math.BigDecimal |
getMarketValue(java.lang.String strategyName)
Gets the total Market Value of all non-FX Positions of the specified Strategy.
|
java.math.BigDecimal |
getMarketValue(java.lang.String strategyName,
java.time.ZonedDateTime date)
Gets the total Market Value of all non-FX Positions of the specified Strategy on the specified Date.
|
java.math.BigDecimal |
getMarketValue(java.lang.String filter,
java.time.ZonedDateTime date,
NamedParam... namedParams)
Gets the total Market Value of all non-FX Positions on the specified Date by an arbitrary filter by
aggregating all relevant transactions.
|
java.math.BigDecimal |
getMarketValue(java.time.ZonedDateTime date)
Gets the total Market Value of all non-FX Positions of the entire System on the specified Date.
|
java.math.BigDecimal |
getNetLiqValue()
Gets the Net-Liquidation-Value of the entire System.
|
java.math.BigDecimal |
getNetLiqValue(java.lang.String strategyName)
Gets the Net-Liquidation-Value of the specified Strategy.
|
int |
getOpenPositions()
Gets the number of open positions of the entire System.
|
int |
getOpenPositions(java.lang.String strategyName)
Gets the number of open positions of the specified Strategy.
|
int |
getOpenPositions(java.lang.String strategyName,
java.time.ZonedDateTime date)
Gets the number of open positions of the specified Strategy on the specified date.
|
int |
getOpenPositions(java.time.ZonedDateTime date)
Gets the number of open positions of the entire System on the specified date.
|
java.util.List<java.lang.String> |
getOpenPositionsByFilter(java.lang.String filter,
java.time.ZonedDateTime date,
NamedParam... namedParams)
Gets all open positions on the specified Date by an arbitrary filter by
aggregating all relevant transactions.
|
java.lang.String |
getPortfolioValue()
Gets the
PortfolioValue of the entire System. |
java.lang.String |
getPortfolioValue(java.lang.String strategyName)
Gets the
PortfolioValue of the specified Strategy. |
java.lang.String |
getPortfolioValue(java.lang.String strategyName,
java.time.ZonedDateTime date)
Gets the
PortfolioValue of the specified Strategy on the specified Date. |
java.math.BigDecimal |
getRealizedPL()
Gets the total Realized Profit and Loss of all Positions of the entire System.
|
java.math.BigDecimal |
getRealizedPL(java.lang.String strategyName)
Gets the total Realized Profit and Loss of all Positions of the specified Strategy.
|
java.util.Collection<java.lang.String> |
getTransactionsByFilter(java.lang.String filter,
java.time.ZonedDateTime date,
NamedParam... namedParams)
Gets all transactions by an arbitrary filter up to the given date.
|
java.math.BigDecimal |
getUnrealizedPL()
Gets the total Unrealized Profit and Loss of all Positions of the entire System.
|
java.math.BigDecimal |
getUnrealizedPL(java.lang.String strategyName)
Gets the total Unrealized Profit and Loss of all Positions of the specified Strategy.
|
void |
restorePortfolioValues(StrategyVO strategy,
java.time.ZonedDateTime fromDate,
java.time.ZonedDateTime toDate)
Restores all PortfolioValues of the specified Strategy after the
fromDate up to and
including the toDate . |
void |
savePortfolioValue(java.lang.String json)
Saves current Portfolio Values as a consequence for a performance relevant Transaction.
|
void |
savePortfolioValues()
Saves current Portfolio Values for all Strategies marked as
autoActivate |
serialize
public java.util.Collection<java.lang.String> getTransactionsByFilter(java.lang.String filter, java.time.ZonedDateTime date, NamedParam... namedParams)
PythonPortfolioService
The variable t
can be used to reference the Transaction.
Examples:
t.account.name = 'IB_NATIVE_TEST'
t.account.name = :accountName // //specifying 'accountName' as a namedParameter
t.currency = 'USD'
getTransactionsByFilter
in class PythonPortfolioService
public java.util.List<java.lang.String> getOpenPositionsByFilter(java.lang.String filter, java.time.ZonedDateTime date, NamedParam... namedParams)
PythonPortfolioService
s
and t
can be used to reference the Security and Transaction.
Examples:
s.symbol = 'IBM'
s.symbol = :symbol //specifying 'symbol' as a namedParameter
s.class = ForexImpl
s.securityFamily.currency = 'USD'
s.baseCurrency = 'EUR'
s.gics like '12______'
getOpenPositionsByFilter
in class PythonPortfolioService
public java.math.BigDecimal getCashBalance()
PythonPortfolioService
getCashBalance
in class PythonPortfolioService
public java.math.BigDecimal getCashBalance(java.lang.String strategyName)
PythonPortfolioService
getCashBalance
in class PythonPortfolioService
public java.math.BigDecimal getCashBalance(java.time.ZonedDateTime date)
PythonPortfolioService
getCashBalance
in class PythonPortfolioService
public java.math.BigDecimal getCashBalance(java.lang.String strategyName, java.time.ZonedDateTime date)
PythonPortfolioService
getCashBalance
in class PythonPortfolioService
public java.math.BigDecimal getCashBalance(java.lang.String strategyName, java.time.ZonedDateTime date, NamedParam... namedParams)
PythonPortfolioService
t
can be used to reference the Transaction.
Examples:
t.account.name = 'IB_NATIVE_TEST'
t.account.name = :accountName // //specifying 'accountName' as a namedParameter
t.currency = 'USD'
Note: The current value of Forex
Positions will not
be taken into accountgetCashBalance
in class PythonPortfolioService
public java.math.BigDecimal getMarketValue()
PythonPortfolioService
getMarketValue
in class PythonPortfolioService
public java.math.BigDecimal getMarketValue(java.lang.String strategyName)
PythonPortfolioService
getMarketValue
in class PythonPortfolioService
public java.math.BigDecimal getMarketValue(java.time.ZonedDateTime date)
PythonPortfolioService
getMarketValue
in class PythonPortfolioService
public java.math.BigDecimal getMarketValue(java.lang.String strategyName, java.time.ZonedDateTime date)
PythonPortfolioService
getMarketValue
in class PythonPortfolioService
public java.math.BigDecimal getMarketValue(java.lang.String filter, java.time.ZonedDateTime date, NamedParam... namedParams)
PythonPortfolioService
s
and t
can be used to reference the Security and Transaction.
Examples:
s.symbol = 'IBM'
s.symbol = :symbol //specifying 'symbol' as a namedParameter
s.class = ForexImpl
s.securityFamily.currency = 'USD'
s.baseCurrency = 'EUR'
s.gics like '12______'
getMarketValue
in class PythonPortfolioService
public java.math.BigDecimal getRealizedPL()
PythonPortfolioService
getRealizedPL
in class PythonPortfolioService
public java.math.BigDecimal getRealizedPL(java.lang.String strategyName)
PythonPortfolioService
getRealizedPL
in class PythonPortfolioService
public java.math.BigDecimal getUnrealizedPL()
PythonPortfolioService
getUnrealizedPL
in class PythonPortfolioService
public java.math.BigDecimal getUnrealizedPL(java.lang.String strategyName)
PythonPortfolioService
getUnrealizedPL
in class PythonPortfolioService
public java.math.BigDecimal getNetLiqValue()
PythonPortfolioService
getNetLiqValue
in class PythonPortfolioService
public java.math.BigDecimal getNetLiqValue(java.lang.String strategyName)
PythonPortfolioService
getNetLiqValue
in class PythonPortfolioService
public java.math.BigDecimal getAvailableBalance()
PythonPortfolioService
getAvailableBalance
in class PythonPortfolioService
public java.math.BigDecimal getAvailableBalance(java.lang.String strategyName)
PythonPortfolioService
getAvailableBalance
in class PythonPortfolioService
public int getOpenPositions()
PythonPortfolioService
getOpenPositions
in class PythonPortfolioService
public int getOpenPositions(java.lang.String strategyName)
PythonPortfolioService
getOpenPositions
in class PythonPortfolioService
public int getOpenPositions(java.time.ZonedDateTime date)
PythonPortfolioService
getOpenPositions
in class PythonPortfolioService
public int getOpenPositions(java.lang.String strategyName, java.time.ZonedDateTime date)
PythonPortfolioService
getOpenPositions
in class PythonPortfolioService
public java.lang.String getPortfolioValue()
PythonPortfolioService
PortfolioValue
of the entire System.getPortfolioValue
in class PythonPortfolioService
public java.lang.String getPortfolioValue(java.lang.String strategyName)
PythonPortfolioService
PortfolioValue
of the specified Strategy.getPortfolioValue
in class PythonPortfolioService
public java.lang.String getPortfolioValue(java.lang.String strategyName, java.time.ZonedDateTime date)
PythonPortfolioService
PortfolioValue
of the specified Strategy on the specified Date.
Note: RealizedPL and UnRealizedPL will be set to nullgetPortfolioValue
in class PythonPortfolioService
public java.util.Collection<java.lang.String> getBalances()
PythonPortfolioService
CashBalances
of the entire system.getBalances
in class PythonPortfolioService
public java.util.Collection<java.lang.String> getBalances(java.lang.String strategyName)
PythonPortfolioService
CashBalances
for the specified Strategy.getBalances
in class PythonPortfolioService
public java.util.Collection<java.lang.String> getFxExposure()
PythonPortfolioService
getFxExposure
in class PythonPortfolioService
public java.util.Collection<java.lang.String> getFxExposure(java.lang.String strategyName)
PythonPortfolioService
getFxExposure
in class PythonPortfolioService
public void savePortfolioValue(java.lang.String json) throws java.io.IOException
PythonPortfolioService
Transaction.isPerformanceRelevant()
. If there have been
PortfolioValues created since this Transaction, they are recreated (including PortfolioValues
of the AlgoTrader Server).savePortfolioValue
in class PythonPortfolioService
java.io.IOException
public void savePortfolioValues()
PythonPortfolioService
autoActivate
savePortfolioValues
in class PythonPortfolioService
public void restorePortfolioValues(StrategyVO strategy, java.time.ZonedDateTime fromDate, java.time.ZonedDateTime toDate)
PythonPortfolioService
fromDate
up to and
including the toDate
.restorePortfolioValues
in class PythonPortfolioService