How to get the Buying Power in PosSizer?
Author: Frank1972
Creation Date: 12/11/2016 7:33 PM
profile picture

Frank1972

#1
Hi,

I'm writing a custom PosSizer. My question is: Is there a way to get the buying power? What I'm looking for is a way to deal with differences in buying power that results from different symbols. For example, a company like Microsoft will have a base 30% margin requirement plus a 10% concentration for a total of 40% margin requirement. But a leveraged ETF, like UVXY, has a 100% margin requirement and thus doesn't allow any margin to be used and your buying power would be much lower than the Microsoft transaction. Is there anyway to get this information and use that in a PosSizer?

Where I am getting this information is using Fidelity's Margin Calculator and entering in hypothetical orders to see what the margin requirements are for different symbols.

Thanks,

-Frank
profile picture

Eugene

#2
Hi Frank,

Ultimately, is your question about finding an external source of margin requirements for different symbols which could be queried from the PosSizer library? Otherwise please rephrase.
profile picture

Frank1972

#3
Eugene,

Thanks for the reply. Sorry for the confusion. My question is does WealthLab have access to buying power anywhere within the software (PosSizer or Script)?

Thanks,

-Frank
profile picture

Eugene

#4
With regard to accessing the account's equity, buying power etc., no, it doesn't.

P.S. If that could be of any help, here's how you can find out which positions are being held to estimate how much buying power is left by subtracting them from your capital: Alerts pane for the Account Balances and Positions window (post #5).
profile picture

Frank1972

#5
Eugene,

I'm confused. If I choose my Fidelity account to trade with, will I be getting my actually Fidelity Account Balance? My plan is to turn on live trading so all my orders go to Fidelity. In that case will my PosSizer member function:

CODE:
Please log in to see this code.


Will the equity parameter and the case parameter be what my Fidelity account has?

Thanks,

-Frank
profile picture

Eugene

#6
Frank, strategies always operate in a theoretical trading environment and become out-of-synch with your live account. What you'll be getting in this method is the strategy's equity/cash levels.
profile picture

Frank1972

#7
Eugene,

But will my trades will be going to the market? In the Strategy Monitor when I add a strategy I can choose a "Paper Account1", "Paper Account2", "Paper Account3", "<Fidelity Account #>". If I choose my Fidelity Account # will my trades go to the market when my script calls BuyAt... or ShortAt...?

I know that I have to enable a few things and call Fidelity to get authorized for this, but there is a way to have WealthLab send my orders to the market through Fidelity when my script calls BuyAt... or ShortAt... Correct?

Thanks,

-Frank
profile picture

Eugene

#8
Correct.

P.S. Make sure you've read these Wealth-Lab User Guide chapters: Orders (in particular, Portfolio Synch) and Strategy Monitor (esp. Employment Notes).
profile picture

Frank1972

#9
Eugene,

Thank you for answering my questions. I'm reading the Orders chapter and found this:

"Margin accounts cannot trade cash positions with Wealth-Lab Pro"

I have a margin account with Fidelity and I don't really understand what this means. Can you give me a little more background on what this means?

Thanks,

-Frank
profile picture

Frank1972

#10
Eugene,

This makes sense now. I understand that when I place a trade with Fidelity I have choice to do it using margin or just straight cash. This choice is not present in WealthLab, thus all my trades will be done using margin.

This makes sense.

-Frank
profile picture

Frank1972

#11
Hi Eugene,

I noted that in response #2 you said, "finding an external source of margin requirements for different symbols" is there a place that I can get this information? I'm working on updating the SymbolInfo.xml file with the 0.05 orders and see that margin can be put in there as well. If there is a place to get this information while I'm doing this work I figured I could add the margin as well.

Thanks,

-Frank
profile picture

Eugene

#12
Hi Frank,

Sorry, I don't have this information.