I'm using zipline and trying to add a custom calendar to the system so that I can apply it to our country's exchange.
I've looked up on stackoverflow and found this post : How to use a custom calendar in a custom zipline bundle?
However, I couldn't find the directory zipline/utils/calendars mentioned on the post, in which I should find the calendar python files. It seems to be deprecated. So I'm currently lost on how I should tune the trading calendar on this zipline library in order to fulfill my needs. Any solutions, suggestions or links are welcomed.
Thank you in advance.
EDIT :
I'm using python3.5 on mac, and the zipline version seems to be 1.3.0
In version 1.3.0 zipline uses trading_calendars module from quantopian. You have to install it via pip and then you can use it in your project:
from trading_calendars import get_calendar
trading_calendar=get_calendar('XNYS')
List of supported calendars you can find in github: trading_calendars
If you would like to create your own calendar, you have to create your calendar class in similar way like the old one which is described here: trading_calendars zipline documentation Then to use it, you need to register it with register_calendar(). So in the end it should be similar to this:
from trading_calendars import get_calendar, register_calendar
from my_calendar import MyCalendar
register_calendar('MyCalendarName', MyCalendar, True)
trading_calendar=get_calendar('MyCalendarName')
but what about following code for data bundle? I assume there are some other places should be update than this calendar_name? the data bundle still can't import the data in.
register(
'custom-csvdir-bundle',
csvdir_equities(
['daily'],
r'C:\Users\csvdata',
),
calendar_name='XTSE',
start_session=start_session,
end_session=end_session
)
Related
As per redoc github page, there is an example of real life usage for Rebilly API. I really like its formatting and would like to use as my formatting as well. I have created open api yaml file using redoc but formatting that comes out of box is not that appealing.
Does anyone know how can we get same formatting as Rebilly API?
Rebilly is using a paid version of Redoc. You can test it for free at https://redoc.ly.
for the coloring, I think some basic theming/coloring is still possible in the free version of ReDoc. Try this online theme editor to see what are the available options: https://pointnet.github.io/redoc-editor/#/
I am trying to use AWS AppSync on an iOS project. I have successfully setup the framework on the project and now I want to start doing queries. To do that I am using the GraphQLQuery objects generated on the API.swift by amplify cli. Thing with those queries is that they ask for all the available fields of the objects. I want specify the properties I want to fetch but I cannot find the way to do it.
So my question is: how can I specify the fields I want to fetch in a GraphQLQuery?
Thanks
Have you checked out this on GitHub: https://github.com/awslabs/aws-mobile-appsync-sdk-ios
Also there are some sample code in this documentation: https://aws-amplify.github.io/docs/ios/api
I am very new to Flutter, don't know how to implement it. An example would be great.
Here's an example blog post by Alfian Losari on Medium.com. Easy to find that blog post if you search 'flutter google maps places' on google by the way.
And I suggest that you take a look at official google maps plugins changelog. Because the example in that blog post using old marker api, where you have to add your markers on GoogleMapsController. So if you want to update the plugin, you will run into problem.
The marker api has changed and you have to refactor the code in that blog post if you want to use with upgraded google maps plugin, please take a look at the answer on the question that I've asked.
I've got a Dart application that consists of both client and server components. There are a couple of source files that are needed by both client and server. I'm trying to find a way to share them effectively without publishing a library to pub.
I've read through these docs but it doesn't say how to share a library if you don't want to publish it to pub. I'd like to do something like:
import 'package:../../Shared/lib/shared.dart';
But that doesn't work ("Target of URI does not exist").
What options do I have here?
Ah, I figured it out. I have to declare a dependency in my pubspec.yaml like this:
shared:
path: ../shared
Then I can just do this:
import 'package:shared/shared.dart';
I'm looking for a worked example of how to call into Googles oAuth service with a view to simply uploading a txt file. On googles docs I have the followed the example
http://code.google.com/p/google-api-java-client/wiki/OAuth2
but it won't compile .... CalendarScopes.CALENDAR is the problem and I can't see what Jar contains this class. I imported every Jar in the google-oauth-java-client-1.12.0-beta download (Also every jar in google-api-java-client-1.12.0-beta ) I dobn't understand the diff between these but that is for another day.
Any pointers would be welcome.
CalendarScopes.CALENDAR that you mentioned is not a part of a jar file but a scope for Calendar API provided by Google. For a sample to show how to implement that, here is one.
In the meanwhile, I would also suggest going over the following links to develop an understanding of the OAuth and how to use it with the different APIs.
OAuth Playground - This is very helpful when trying to learn about different API and permissions relating to those.
OpenID Connect Official Documentation
Hope this helps.