financialinstrument's People
Forkers
claymoremarshall englianhu aaronsoderstrom ruiyiz uhasan1 algoskynet n0talent wulixin uims justinmshea caozq19 cnxtech loochao hfu44financialinstrument's Issues
TrueFX has changed from HTTP to HTTPS
Hello,
TrueFX is now responding HTTP 400 Bad request to HTTP requests. So..
https://github.com/braverock/FinancialInstrument/blob/master/inst/parser/download.TrueFX.R
on line 120 the url
http://www.truefx.com/dev/data/
should now be
convert P&L in points to USD FinancialInstrument package
I have several currency pairs, not necessarily downloaded from online resources, it could be a regular file from disk, but for simplicity of the example and reproducibility I will download from the network.
library(quantmod)
getSymbols("AUD/CAD",src="oanda",from="2024-01-01")
getSymbols("CAD/CHF",src="oanda",from="2024-01-01")
getSymbols("USD/JPY",src="oanda",from="2024-01-01")
Now let’s calculate a simple “buy and hold” strategy in points
# buy and hold P&L in points
BH_AUDCAD <- AUDCAD - c(coredata(AUDCAD[1]))
BH_CADCHF <- CADCHF - c(coredata(CADCHF[1]))
BH_USDJPY <- USDJPY - c(coredata(USDJPY[1]))
Now I would like to calculate p&l in USD but I’m a little confused and don’t know how to do it correctly
library(FinancialInstrument)
currency(c("AUD", "CAD", "CHF", "USD", "JPY"))
stock(c("AUDCAD", "CADCHF", "USDJPY"), currency="USD")
PnL_USD_AUDCAD <- ....
PnL_USD_CADCHF <- ....
PnL_USD_USDJPY <- ....
C stack usage is too close to the limit
Hello, I'm getting the following error when trying to run the command:
stock(data, currency = "USD")
Error: C stack usage 15923264 is too close to the limit
Thanks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.