Skip to content

Instantly share code, notes, and snippets.

View junajan's full-sized avatar
💭
howdy 😁

Jan Jůna junajan

💭
howdy 😁
View GitHub Profile
=== DAX version ===
Reading DAX history data from 1998-11-02 to 2016-12-30
INIT CAPITAL: 20000
02.11.1998: BUY 4x DAX for price 4761.149902
02.05.2000: SELL 4x DAX for price 7555.919922 (profit 11179.08008 = 55.9%)
11.01.2001: BUY 4x DAX for price 6465.209961
02.05.2002: SELL 4x DAX for price 4964.560059 (profit -6002.599607999997 = -19.25%)
01.11.2002: BUY 7x DAX for price 3165.159912
02.05.2003: SELL 7x DAX for price 2986.00 (profit -1254.1193840000014 = -4.98%)
01.12.2003: BUY 6x DAX for price 3821.199951
var MarketData = require("barchart-market-data-api");
var code = "6c0c63ab7c0bc4d3ea113ad26789e64c"
var md = new MarketData(code);
var ops= {
startDate: '20100101',
endDate: '20170101',
maxRecords: 1000000
}
md.getHistory('IBM', 'dailyContinue', ops).then(function (history) {
console.log(" ===== LEN: %d =====", history.length)
@junajan
junajan / uo.list
Created January 9, 2017 21:35
UltimateOscilator strategy backtest results
Backtest: 2007 - 2012-09-28 (podle financniku)
===== YEAR STATS ====
Year: 2007 Start: 20000.00 End: 22652.24 Percent: 13.26 OrderCount: 0 Profit/Loss: 2652.24
Year: 2008 Start: 22652.24 End: 32192.01 Percent: 42.11 OrderCount: 0 Profit/Loss: 9539.77
Year: 2009 Start: 32192.01 End: 27560.51 Percent: -14.39 OrderCount: 0 Profit/Loss: -4631.50
Year: 2010 Start: 27560.51 End: 28971.64 Percent: 5.12 OrderCount: 0 Profit/Loss: 1411.13
Year: 2011 Start: 28971.64 End: 35281.38 Percent: 21.78 OrderCount: 0 Profit/Loss: 6309.74
Year: 2012 Start: 35281.38 End: 39297.86 Percent: 11.38 OrderCount: 0 Profit/Loss: 4016.48
=================== TEST END ===================
============== Finished ==============: 70350.058ms
Scale once - actual S&P 100
===== YEAR STATS ====
Year: 2007 Start: 20000.00 End: 22254.64 Percent: 11.27 OrderCount: 0 Profit/Loss: 2254.64
Year: 2008 Start: 22254.64 End: 29523.27 Percent: 32.66 OrderCount: 0 Profit/Loss: 7268.63
Year: 2009 Start: 29523.27 End: 33331.31 Percent: 12.90 OrderCount: 0 Profit/Loss: 3808.04
Year: 2010 Start: 33331.31 End: 34990.17 Percent: 4.98 OrderCount: 0 Profit/Loss: 1658.86
Year: 2011 Start: 34990.17 End: 40614.19 Percent: 16.07 OrderCount: 0 Profit/Loss: 5624.02
Year: 2012 Start: 40614.19 End: 47645.73 Percent: 17.31 OrderCount: 0 Profit/Loss: 7031.54
Year: 2013 Start: 47645.73 End: 58208.52 Percent: 22.17 OrderCount: 0 Profit/Loss: 10562.79
Year: 2014 Start: 58208.52 End: 67386.46 Percent: 15.77 OrderCount: 0 Profit/Loss: 9177.94
Strategy90 - data quandl 2007 - 12.1.2017
Current S&P 100
===== YEAR STATS ====
Year: 2007 Start: 20000.00 End: 24445.71 Percent: 22.23 OrderCount: 510 Profit/Loss: 4445.71
Year: 2008 Start: 24445.71 End: 28551.50 Percent: 16.80 OrderCount: 333 Profit/Loss: 4105.79
Year: 2009 Start: 28551.50 End: 37032.13 Percent: 29.70 OrderCount: 349 Profit/Loss: 8480.63
Year: 2010 Start: 37032.13 End: 42466.80 Percent: 14.68 OrderCount: 489 Profit/Loss: 5434.67
Year: 2011 Start: 42466.80 End: 51677.30 Percent: 21.69 OrderCount: 461 Profit/Loss: 9210.50
Year: 2012 Start: 51677.30 End: 62368.69 Percent: 20.69 OrderCount: 536 Profit/Loss: 10691.40
//------------------------------------------------------
//
// Formula Name: Donchian Channel trading System
// Author/Uploader: Trading Tuitions
// E-mail: support@tradingtuitions.com
// Website: www.tradingtuitions.com
//------------------------------------------------------
_SECTION_BEGIN("Donchian Channel trading System");
===== MONTH STATS ====
Month: 01.1995 Start: 20000.00 End: 20284.15 Percent: 1.42 OrderCount: 52 Profit/Loss: 284.15
Month: 02.1995 Start: 20284.15 End: 21160.34 Percent: 4.32 OrderCount: 51 Profit/Loss: 876.19
Month: 03.1995 Start: 21160.34 End: 22764.53 Percent: 7.58 OrderCount: 53 Profit/Loss: 1604.19
Month: 04.1995 Start: 22764.53 End: 23531.23 Percent: 3.37 OrderCount: 58 Profit/Loss: 766.71
Month: 05.1995 Start: 23531.23 End: 24252.47 Percent: 3.07 OrderCount: 61 Profit/Loss: 721.24
Month: 06.1995 Start: 24252.47 End: 24978.16 Percent: 2.99 OrderCount: 47 Profit/Loss: 725.68
Month: 07.1995 Start: 24978.16 End: 25134.16 Percent: 0.62 OrderCount: 55 Profit/Loss: 156.00
Month: 08.1995 Start: 25134.16 End: 26496.21 Percent: 5.42 OrderCount: 62 Profit/Loss: 1362.05
Month: 09.1995 Start: 26496.21 End: 27334.84 Percent: 3.17 OrderCount: 38 Profit/Loss: 838.63
==== SCRIPT ====
'use strict';
/**
* This will import historical data to Mysql table
*/
require('colors');
var async = require("async");
var moment = require("moment");
Bali odkazy:
vodopady
https://goo.gl/maps/g5AZ6bzw5E82
https://goo.gl/maps/Y55Ybkuzfys
ubytka:
rychle ubytko v denpasaru
- https://www.airbnb.com/rooms/3564032
- https://goo.gl/maps/3iT348JUCds
ticker pieces amount open_price open_date close_price close_date profit
MMM 2 73 199.1137 2017-07-26 201.3100 2017-07-31 160.3299
MMM 1 36 199.3078 2017-07-25 201.3100 2017-07-31 72.0792
MO 1 102 71.8088 2017-07-26 73.8951 2017-07-27 212.8026
MET 1 130 54.7676 2017-07-18 55.7493 2017-07-25 127.6210
MCD 1 46 153.8317 2017-07-19 159.0729 2017-07-25 241.0952
MET 2 263 54.6434 2017-07-20 55.7493 2017-07-25 290.8517
MET 3 396 54.6418 2017-07-21 55.7493 2017-07-25 438.5700
C 1 109 65.9884 2017-07-21 68.0155 2017-07-25 220.9539
MCD 2 95 151.9305 2017-07-24 159.0729 2017-07-25 678.5280