Comments (8)
no worries, just means I will ajust things to get a back test working. as of now, when the new position in back test is failing
Position position = new Position(holding.getExchange(), holding.getAsset(), amount);
calls the constructor
public Position(Exchange exchange, Asset asset, Amount volume) {
volume.assertBasis(asset.getBasis());
this.exchange = exchange;
this.volumeCount = volume.toBasis(asset.getBasis(), Remainder.TO_HOUSE).getCount();
this.asset = asset;
}
of which volume.assertBasis(asset.getBasis()); throws the error.
Happy to change it, just wondered if a checkin was missed.
from cointrader.
Ah yes, the volume
must be converted a DiscreteAmount
using the method
I mentioned. You probably want to use Remainder.ROUND_EVEN
.
On Mon, Jul 21, 2014 at 2:28 PM, douggie [email protected] wrote:
no worries, just means I will ajust things to get a back test working. as
of now, when the new position in back test is failing
Position position = new Position(holding.getExchange(),
holding.getAsset(), amount);calls the constructor
public Position(Exchange exchange, Asset asset, Amount volume) {
volume.assertBasis(asset.getBasis());
this.exchange = exchange;
this.volumeCount = volume.toBasis(asset.getBasis(), Remainder.TO_HOUSE).getCount();
this.asset = asset;
}of which volume.assertBasis(asset.getBasis()); throws the error.
Happy to change it, just wondered if a checkin was missed.
—
Reply to this email directly or view it on GitHub
#40 (comment).
from cointrader.
few wee issues with Portfolio.java, as the positions gets instansiated to null, so the for loop is empty.
public void modifyPosition( Position position, Authorization authorization ) {
assert authorization != null;
assert position != null;
boolean modifiedExistingPosition = false;
for( Position curPosition : positions ) {
if( curPosition.merge(position) ) {
modifiedExistingPosition = true;
break;
}
}
if( !modifiedExistingPosition )
positions.add(position);
}
from cointrader.
P.S. I did not test that checkin very much, just that save-data
and
report-data
worked ok. Probably other things broken but since it is the
develop
branch...
On Mon, Jul 21, 2014 at 2:33 PM, [email protected] wrote:
Ah yes, the
volume
must be converted aDiscreteAmount
using the method
I mentioned. You probably want to useRemainder.ROUND_EVEN
.On Mon, Jul 21, 2014 at 2:28 PM, douggie [email protected] wrote:
no worries, just means I will ajust things to get a back test working. as
of now, when the new position in back test is failing
Position position = new Position(holding.getExchange(),
holding.getAsset(), amount);calls the constructor
public Position(Exchange exchange, Asset asset, Amount volume) {
volume.assertBasis(asset.getBasis());
this.exchange = exchange;
this.volumeCount = volume.toBasis(asset.getBasis(), Remainder.TO_HOUSE).getCount();
this.asset = asset;
}of which volume.assertBasis(asset.getBasis()); throws the error.
Happy to change it, just wondered if a checkin was missed.
—
Reply to this email directly or view it on GitHub
#40 (comment).
from cointrader.
no worries, I can fix i up
from cointrader.
Yes this is not complete; I just wanted to check-in so you could work with
the latest...
On Mon, Jul 21, 2014 at 2:34 PM, [email protected] wrote:
P.S. I did not test that checkin very much, just that
save-data
and
report-data
worked ok. Probably other things broken but since it is the
develop
branch...On Mon, Jul 21, 2014 at 2:33 PM, [email protected] wrote:
Ah yes, the
volume
must be converted aDiscreteAmount
using the
method I mentioned. You probably want to useRemainder.ROUND_EVEN
.On Mon, Jul 21, 2014 at 2:28 PM, douggie [email protected]
wrote:no worries, just means I will ajust things to get a back test working.
as of now, when the new position in back test is failing
Position position = new Position(holding.getExchange(),
holding.getAsset(), amount);calls the constructor
public Position(Exchange exchange, Asset asset, Amount volume) {
volume.assertBasis(asset.getBasis());
this.exchange = exchange;
this.volumeCount = volume.toBasis(asset.getBasis(), Remainder.TO_HOUSE).getCount();
this.asset = asset;
}of which volume.assertBasis(asset.getBasis()); throws the error.
Happy to change it, just wondered if a checkin was missed.
—
Reply to this email directly or view it on GitHub
#40 (comment)
.
from cointrader.
just thought I would check, sounds like expecting a few things to break, just wanted to make sure.
from cointrader.
coolio thanks, will work through the issues
from cointrader.
Related Issues (20)
- no module file found for MarketsCommand.epl HOT 1
- Cannot exit console HOT 1
- buy antlr command error parsing HOT 3
- Information HOT 4
- Running BookTest in Eclipse failed due to failed db initialization HOT 2
- Latest master cannot build with mvn HOT 44
- I built it... but it fails to store data... HOT 3
- QUESTION: Recovery from outages HOT 7
- Is master a working version? HOT 2
- Upgrade to Apache Flink
- Problem with connecting to Mysql database HOT 2
- Location of cointrader.properties HOT 3
- NoClassDefFoundError: javax/xml/bind/JAXBException HOT 8
- doc update: input console under eclipse HOT 1
- exit fails HOT 4
- How to Add an XChange HOT 4
- Trigger on order fill? HOT 1
- Is last version working? HOT 3
- Dependency org.apache.zookeeper:zookeeper, leading to CVE problem HOT 2
- Application can not start because of the hibernate version HOT 3
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.
from cointrader.