File tree 36 files changed +128
-117
lines changed
36 files changed +128
-117
lines changed Original file line number Diff line number Diff line change 1
1
# If you prefer the allow list template instead of the deny list, see community template:
2
- # https:// github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
2
+ # github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3
3
#
4
4
# Binaries for programs and plugins
5
5
* .exe
Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ package backtest
3
3
import (
4
4
"fmt"
5
5
"time"
6
- "xoney/common/data"
7
- "xoney/exchange"
8
- "xoney/internal"
9
6
10
- exec "xoney/internal/executing"
11
- st "xoney/strategy"
7
+ "github.com/quick-trade/xoney/common/data"
8
+ "github.com/quick-trade/xoney/exchange"
9
+ "github.com/quick-trade/xoney/internal"
10
+
11
+ exec "github.com/quick-trade/xoney/internal/executing"
12
+ st "github.com/quick-trade/xoney/strategy"
12
13
)
13
14
14
15
type StepByStepBacktester struct {
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ package backtest
2
2
3
3
import (
4
4
"math"
5
- "xoney/common/data"
6
- "xoney/internal"
5
+
6
+ "github.com/quick-trade/xoney/common/data"
7
+ "github.com/quick-trade/xoney/internal"
7
8
)
8
9
9
10
type Metric interface {
Original file line number Diff line number Diff line change 1
1
package common
2
2
3
3
import (
4
- "xoney/common/data"
5
- "xoney/errors"
6
- "xoney/internal"
4
+ "github.com/quick-trade/ xoney/common/data"
5
+ "github.com/quick-trade/ xoney/errors"
6
+ "github.com/quick-trade/ xoney/internal"
7
7
)
8
8
9
9
type BaseDistribution map [data.Currency ]float64
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ package data
3
3
import (
4
4
"sort"
5
5
"time"
6
- "xoney/errors"
7
- "xoney/internal"
6
+
7
+ "github.com/quick-trade/xoney/errors"
8
+ "github.com/quick-trade/xoney/internal"
8
9
)
9
10
10
11
type Period struct {
Original file line number Diff line number Diff line change 4
4
"reflect"
5
5
"testing"
6
6
"time"
7
- "xoney/errors"
7
+
8
+ "github.com/quick-trade/xoney/errors"
8
9
)
9
10
10
11
func timeFrameMinute () TimeFrame {
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ package data
2
2
3
3
import (
4
4
"time"
5
- "xoney/internal"
5
+
6
+ "github.com/quick-trade/xoney/internal"
6
7
)
7
8
8
9
type Equity struct {
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
"time"
6
6
7
- "xoney/errors"
8
- "xoney/internal"
7
+ "github.com/quick-trade/ xoney/errors"
8
+ "github.com/quick-trade/ xoney/internal"
9
9
)
10
10
11
11
type Exchange string
Original file line number Diff line number Diff line change 4
4
"fmt"
5
5
"sync"
6
6
7
- "xoney/errors"
8
- "xoney/exchange"
9
- "xoney/internal"
7
+ "github.com/quick-trade/ xoney/errors"
8
+ "github.com/quick-trade/ xoney/exchange"
9
+ "github.com/quick-trade/ xoney/internal"
10
10
)
11
11
12
12
// Event is an interface designed for interaction with the exchange.
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import (
4
4
"fmt"
5
5
"math"
6
6
7
- "xoney/common"
8
- "xoney/common/data"
9
- "xoney/errors"
10
- "xoney/internal"
11
- "xoney/internal/structures"
7
+ "github.com/quick-trade/ xoney/common"
8
+ "github.com/quick-trade/ xoney/common/data"
9
+ "github.com/quick-trade/ xoney/errors"
10
+ "github.com/quick-trade/ xoney/internal"
11
+ "github.com/quick-trade/ xoney/internal/structures"
12
12
)
13
13
14
14
// OrderHeap is a utility structure for efficient management of a collection of orders.
Original file line number Diff line number Diff line change 1
1
package exchange
2
2
3
3
import (
4
- "xoney/common/data"
5
- "xoney/errors"
6
- "xoney/internal"
4
+ "github.com/quick-trade/ xoney/common/data"
5
+ "github.com/quick-trade/ xoney/errors"
6
+ "github.com/quick-trade/ xoney/internal"
7
7
)
8
8
9
9
type OrderType string
Original file line number Diff line number Diff line change 1
- module xoney
1
+ module github.com/quick-trade/ xoney
2
2
3
3
go 1.21.6
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package executing
3
3
import (
4
4
"fmt"
5
5
6
- "xoney/events"
7
- "xoney/exchange"
6
+ "github.com/quick-trade/ xoney/events"
7
+ "github.com/quick-trade/ xoney/exchange"
8
8
)
9
9
10
10
// ProcessEvent takes an exchange.Connector and an events.Event as parameters and processes the
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package internal
3
3
import (
4
4
"math"
5
5
6
- "xoney/errors"
6
+ "github.com/quick-trade/ xoney/errors"
7
7
)
8
8
9
9
type Data []float64
Original file line number Diff line number Diff line change 1
1
package structures
2
2
3
3
import (
4
- "xoney/errors"
5
- "xoney/internal"
4
+ "github.com/quick-trade/ xoney/errors"
5
+ "github.com/quick-trade/ xoney/internal"
6
6
)
7
7
8
8
type Equaler [T any ] interface {
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import (
4
4
"context"
5
5
"fmt"
6
6
7
- "xoney/common/data"
8
- conn "xoney/exchange"
9
- "xoney/internal"
10
- exec "xoney/internal/executing"
11
- st "xoney/strategy"
7
+ "github.com/quick-trade/ xoney/common/data"
8
+ conn "github.com/quick-trade/ xoney/exchange"
9
+ "github.com/quick-trade/ xoney/internal"
10
+ exec "github.com/quick-trade/ xoney/internal/executing"
11
+ st "github.com/quick-trade/ xoney/strategy"
12
12
)
13
13
14
14
type DataSupplier interface {
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ package strategy
3
3
import (
4
4
"time"
5
5
6
- "xoney/common/data"
7
- "xoney/events"
8
- "xoney/exchange"
6
+ "github.com/quick-trade/ xoney/common/data"
7
+ "github.com/quick-trade/ xoney/events"
8
+ "github.com/quick-trade/ xoney/exchange"
9
9
)
10
10
11
11
type Durations map [data.Instrument ]time.Duration
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import (
5
5
"testing"
6
6
"time"
7
7
8
- bt "xoney/backtest"
9
- "xoney/common"
10
- "xoney/common/data"
11
- "xoney/exchange"
12
- testdata "xoney/testdata/backtesting"
13
- dtr "xoney/testdata/dataread"
8
+ bt "github.com/quick-trade/ xoney/backtest"
9
+ "github.com/quick-trade/ xoney/common"
10
+ "github.com/quick-trade/ xoney/common/data"
11
+ "github.com/quick-trade/ xoney/exchange"
12
+ testdata "github.com/quick-trade/ xoney/testdata/backtesting"
13
+ dtr "github.com/quick-trade/ xoney/testdata/dataread"
14
14
)
15
15
16
16
var (
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ package data_test
3
3
import (
4
4
"testing"
5
5
"time"
6
- "xoney/common/data"
7
- "xoney/errors"
6
+
7
+ "github.com/quick-trade/xoney/common/data"
8
+ "github.com/quick-trade/xoney/errors"
8
9
)
9
10
10
11
func newTestTimeFrame () data.TimeFrame {
Original file line number Diff line number Diff line change 4
4
"testing"
5
5
"time"
6
6
7
- "xoney/common/data"
8
- "xoney/errors"
7
+ "github.com/quick-trade/ xoney/common/data"
8
+ "github.com/quick-trade/ xoney/errors"
9
9
)
10
10
11
11
func TestSymbolString (t * testing.T ) {
Original file line number Diff line number Diff line change 4
4
"strings"
5
5
"testing"
6
6
7
- "xoney/common"
8
- "xoney/common/data"
9
- "xoney/errors"
7
+ "github.com/quick-trade/ xoney/common"
8
+ "github.com/quick-trade/ xoney/common/data"
9
+ "github.com/quick-trade/ xoney/errors"
10
10
)
11
11
12
12
func usd () data.Currency {
Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ package main
3
3
import (
4
4
"time"
5
5
6
- bt "xoney/backtest"
7
- "xoney/common"
8
- "xoney/common/data"
9
- "xoney/exchange"
10
- st "xoney/strategy"
11
- testdata "xoney/testdata/backtesting"
12
- dtr "xoney/testdata/dataread"
6
+ bt "github.com/quick-trade/ xoney/backtest"
7
+ "github.com/quick-trade/ xoney/common"
8
+ "github.com/quick-trade/ xoney/common/data"
9
+ "github.com/quick-trade/ xoney/exchange"
10
+ st "github.com/quick-trade/ xoney/strategy"
11
+ testdata "github.com/quick-trade/ xoney/testdata/backtesting"
12
+ dtr "github.com/quick-trade/ xoney/testdata/dataread"
13
13
)
14
14
15
15
var (
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ package main
3
3
import (
4
4
"time"
5
5
6
- bt "xoney/backtest"
7
- "xoney/common"
8
- "xoney/common/data"
9
- "xoney/exchange"
10
- st "xoney/strategy"
11
- testdata "xoney/testdata/backtesting"
12
- dtr "xoney/testdata/dataread"
13
- tk "xoney/toolkit"
6
+ bt "github.com/quick-trade/ xoney/backtest"
7
+ "github.com/quick-trade/ xoney/common"
8
+ "github.com/quick-trade/ xoney/common/data"
9
+ "github.com/quick-trade/ xoney/exchange"
10
+ st "github.com/quick-trade/ xoney/strategy"
11
+ testdata "github.com/quick-trade/ xoney/testdata/backtesting"
12
+ dtr "github.com/quick-trade/ xoney/testdata/dataread"
13
+ tk "github.com/quick-trade/ xoney/toolkit"
14
14
)
15
15
16
16
var (
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import (
5
5
"fmt"
6
6
"testing"
7
7
8
- "xoney/common"
9
- "xoney/common/data"
10
- "xoney/events"
11
- "xoney/exchange"
8
+ "github.com/quick-trade/ xoney/common"
9
+ "github.com/quick-trade/ xoney/common/data"
10
+ "github.com/quick-trade/ xoney/events"
11
+ "github.com/quick-trade/ xoney/exchange"
12
12
)
13
13
14
14
func usd () data.Currency {
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ import (
5
5
"testing"
6
6
"time"
7
7
8
- "xoney/common"
9
- "xoney/common/data"
10
- "xoney/errors"
11
- "xoney/exchange"
8
+ "github.com/quick-trade/ xoney/common"
9
+ "github.com/quick-trade/ xoney/common/data"
10
+ "github.com/quick-trade/ xoney/errors"
11
+ "github.com/quick-trade/ xoney/exchange"
12
12
)
13
13
14
14
func usd () data.Currency {
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package exchange_test
3
3
import (
4
4
"testing"
5
5
6
- "xoney/common/data"
7
- "xoney/exchange"
6
+ "github.com/quick-trade/ xoney/common/data"
7
+ "github.com/quick-trade/ xoney/exchange"
8
8
)
9
9
10
10
func eth () data.Symbol {
Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ package internal_test
2
2
3
3
import (
4
4
"testing"
5
- "xoney/errors"
6
- "xoney/internal/structures"
5
+
6
+ "github.com/quick-trade/xoney/errors"
7
+ "github.com/quick-trade/xoney/internal/structures"
7
8
)
8
9
9
10
type MockEqualer int
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ package internal_test
3
3
import (
4
4
"testing"
5
5
6
- "xoney/errors"
7
- "xoney/internal"
6
+ "github.com/quick-trade/ xoney/errors"
7
+ "github.com/quick-trade/ xoney/internal"
8
8
)
9
9
10
10
func array () []float64 {
Original file line number Diff line number Diff line change 4
4
"reflect"
5
5
"sort"
6
6
"testing"
7
- "xoney/internal"
7
+
8
+ "github.com/quick-trade/xoney/internal"
8
9
)
9
10
10
11
func Map () map [string ]int {
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ import (
5
5
"math"
6
6
"testing"
7
7
8
- "xoney/common"
9
- "xoney/common/data"
10
- "xoney/errors"
11
- "xoney/exchange"
12
- "xoney/internal"
13
- "xoney/toolkit"
8
+ "github.com/quick-trade/ xoney/common"
9
+ "github.com/quick-trade/ xoney/common/data"
10
+ "github.com/quick-trade/ xoney/errors"
11
+ "github.com/quick-trade/ xoney/exchange"
12
+ "github.com/quick-trade/ xoney/internal"
13
+ "github.com/quick-trade/ xoney/toolkit"
14
14
)
15
15
16
16
const epsilon = 0.001
You can’t perform that action at this time.
0 commit comments