finmarketpy icon indicating copy to clipboard operation
finmarketpy copied to clipboard

spread trading costs

Open mg64ve opened this issue 5 years ago • 5 comments

Hi,

nice library! I have a question, is finmarketpy considering spread trading costs?

Kindly let me know. Thanks.

Regards.

mg64ve avatar Oct 20 '18 15:10 mg64ve

Hi, yes you can add transaction costs in your backtesting model. Under the load_parameters function, you can define br.spot_tc_bp = 0.5, for example, to add the transaction cost into the trading.

ShihHauTan avatar Oct 23 '18 08:10 ShihHauTan

Thanks ShihHauTan, what does 0.5 stand for? Is it PIPS or percentage? How are trading costs calculated?

mg64ve avatar Oct 23 '18 08:10 mg64ve

@ShihHauTan one more question: walk-forward testing for machine learning models, is it implementable in finmarketpy ?

mg64ve avatar Jan 09 '19 08:01 mg64ve

I think that is probably something you can implement in finmarketpy (but it isn't there at the moment)

saeedamen avatar Jan 09 '19 11:01 saeedamen

Thanks @ShihHauTan , sorry for so many questions but, before dedicating a lot of time and finally find that is not be feasible, I'd prefer to ask. What I want to do is to build a machine learning model within in-samples dataset and then test it in ot-of-samples dataset. Do you think it is feasible with a simple loop? Do you have an example of simple machine learning strategy?

mg64ve avatar Jan 09 '19 11:01 mg64ve