Yeah, hello everyone. Thanks for joining the session right after lunch. I'll try to make it short and very so that people just don't get into a siesta. And yeah, I think there is not many of us here today. So probably if you have any questions during the talk, please raise your hand and we can light. There's no need to wait until the end. So yeah, so without any further addition, so my name is Adrian. I'm the head of MLTerving at Selden and also a fellow at the Institute for Ethical AI and Machine Learning. My role at Selden is around maintaining a few open source projects that revolve around serving and deployment of machine learning models. Before that day, my background was more in sort of like classic software engineering, kind of working as a full stack engineer, back and front of those sorts of things. Which is why it has come to my attention many times how little time we spend talking about security in machine learning systems in general. In classic DevOps, classic software space, generally these type of challenges are way more known and way more researched, but in machine learning, it's not just that we don't know much about what's the best way to secure machine learning workloads, is that key challenges, key security challenges, security challenges are still being proposed as best practice. Today we're gonna be talking about one of those. Probably from the title, you can infer that it's something around pickles, revolving pickles. But before jumping into that, just as our sort of disclaimer, today we are gonna see some tools, some ways to mitigate this risk, which are technically nature, but the application of these tools will ultimately rely in humans and having the right processes in place, as is the case with many things, around security and DevOps in general. So, everyone here loves pickles, right? Probably all of you have had some experience with them. In case you haven't, pickles are Python's native serialization format. So basically, with pickle, you can serialize anything that you want in using pickle, anything in Python. So that includes any Python object, any Python class, also any kind of Python function, any Python code, and basically the way it gets serialized later on is by executing that code back on wherever you are serializing it, which of course raises some questions and raises some challenges that we're gonna be talking about today. But before that, just wanted to emphasize how popular pickles are in the machine learning space.  And when I say popular, so CycleLearn, for example, one of the major frameworks for training machine learning models, is still, as of today, recommends using pickles, using joblet, which is essentially using pickles under the hood, as best practice. And they also know it, that's not a great idea, but they also know that there is no better way to serialize CycleLearn models at the moment. Likewise, you also see examples in Keras, you see examples in PyTorch, that revolve around the use of pickles. And you want to see an example of how a pickle looks like. So here we have the output of serializing a CycleLearn model in pickle. So you try to look through the giveries, you may be able to see some class definitions, some Python imports, some kind of things that will then get run on the other side, once you try to load that model to load the model that you serialize. And here you can see an example of how easy it is to basically poison that. So what we see here is an example of how pickle can also be used to serialize a system call that dumps all of your environment variables. In this case, the output is quite... I mean, you can see quite a big difference between the other output and this kind of output. And here you can actually see at the end, towards the end, you can see like an instruction, saying like M send to bound.txt file. However, you can go very much more subtle with this kind of poison in things. We will see this example in a bit more detail in a second, so that's why I'm not gonna spend too much time on it right now. All this talk about security in machine learning is part of the new nascent field called MLSecOps, which is basically the intersection of standard DevOps, security policies, DevSecOps, and machine learning and MLOps. And you may ask, well, why do we care about this? Well, if it's not obvious, this is the list of eight principles published by the LFAI and data, by the Linux Foundation for AI, and data of what we need to have trusted AI. There you can probably see many terms that have been quite in the news in the recent year due to the race of LLMs, language models, things like robustness, things like privacy, explainability, et cetera, and you also have security in there. And security is one of these key values of these key principles because it doesn't matter how much time you put into aligning your model, your LLM, if then you don't worry about security, then you don't care about security because once you stop an attacker to then just replace your model artifact with something else or poison your LLM into thinking, to spread some false information, for example. So the question then is what do we do about that? The LFAI, for example, on its own, has established an animal setup working group that aims to basically to explore this area, see what are the best practices to secure machine learning systems. So one of the things that they have published, for example, is a top 10 of vulnerabilities that you should think about when designing machine learning systems. This tries to be very close in concept to the OWASP top 10, which some of you may know about, basically the OWASP top 10 for web application, for web development, is something huge, something super popular in the classic software engineering space. And it basically tells you what thing you should be protecting about, how you should mitigate your workload, the risk of someone attacking your workloads. Likewise, we also have OWASP itself. It's also getting into the space now. So OWASP recently, well, recently, maybe like four months ago or something like that, probably it's the top 10 for LLMs. So top 10 security risks that you should think about for large language models. We're not gonna be talking about this in much detail today. Today we are just gonna be covering one of these risks. But if you want to know more about this, there is, you can follow that link to check our talks that basically dive into all these risks. Likewise, so we've seen the LFAA looking into that. We've seen OWASP looking into that. And we also have MITRE. For those of you who don't know, MITRE is a massive consultancy company who spends a lot of time around security. So one of the things they did is to publish a catalog of attack vectors into machine learning systems. Many of them basically rely on attacks that are inherent to any software system. But some of those, basically the ones who don't have the red symbol are specific to machine learning workloads. Again, we are not gonna see all of those, but it's good to keep these resources in mind if you want to learn more about this. Likewise, MITRE recently also released a list of mitigations to all those risks of how and what you should do about those. So far, we've just been hinting at security issues with pickles, which we should worry about. However, that's not the end of the story for pickles. Pickle also suffers from other issues. One of those is issues arising for incompatibility between Python versions. So basically pickles are very sensitive to the Python version that you use to sterilize them, which means that then, when you want to translate that artifact to other environment, it can be quite hard. Likewise, the same thing happens with framework versions. So for example, you can see there the stack trace that comes from the latest cycle learn when you try to load a model that was trained in a previous version. And in a previous, like minor version, something very, very, very minor. The key problem here is not just that there are issues, the added problem is that it's quite hard to travel to the issue. So for example, there is no clue, nothing that hints to an incompatibility version, to an issue with versions. So yeah, pickles cannot be great. We are gonna see now an example of how easy it is to poison a pickle, but before that, just to sort of the same framework of mine, just wanted to cover first some background knowledge of how these things usually get deployed on the wild. So generally, oh, and please ignore the logos there. This architecture will be very similar, regardless of the tools that you use. This is basically how a machine learning system would look like. You generally start with some kind of experimentation phase. This is where the data scientists come in. You train some models. Once you're happy, you sterilize the artifacts in pickle, for example. And that then goes into an artifact store. Sometimes you may also configure a CICD pipeline that then does a training on the fly automatically, and the same thing happens. Sterilizes a pickle, and it gets into the artifact store, and then eventually that goes into your serving layer. Within that serving layer, generally you would have, so let's say this would be running Kubernetes, for example, this pickle would eventually make its way into a microservice, where it would start accepting inference requests. If we look into this microservice, it probably would look like something like this. So for example, within the seldomest app, with our own stack, this would be served by ML server, which is an open source inference server, that would then just load that pickle file. It would receive that pickle file, load it, and then expose a set of endpoints to access that model in real time. Regardless of the tool that you use, it would be something very, very similar to this. As a matter of fact, if you just say it's maker, if you just went to ML, the overall architecture would be quite similar. So with that in mind, we're gonna see now a demo of how easy it would be to poison a model. So we go here. What we have here is a notebook. You can check out the resources on the repo that was linked on this slide before. And what we're gonna do first is train this cycle-learning artifact. So we're gonna train a cycle-learning model, and then we're gonna save it. We're gonna save it in this folder, night model. And if we want to check it out, this is basically just a bunch of gibberish. Now, what I want to say by this is how hard it is to scan these artifacts, actually, to know whether it has something malicious. Because by design, pickles need to run everything that they have. So we have this huge bunch of binary data. Then what we want to do next is serve that model. In this case, we're just gonna call the model server directly. I have it running in the background already, so that's why I'm not gonna start it. We send a request, and the request comes back with some response. So in this case, we just pick a point from the test set, and we just send it, and we get the response. And now we're gonna poison it. So in this case, what we're gonna do to poison it is to tweak the reduce dunder method that is available on cycle-learning classes. And we're gonna change it for the Bay 64 equivalent to off-calling the M system call. It's basically down to your whole environment. So we do that, we poison that, we save our model again, and now we will do something similar to what we saw before. And again, this example is quite crude. This is just an example, but an actual attacker could go way more subtle. So now, what we're just to verify that is actually, that's our environment. It's gonna remove the previous file. Then we reload that model artifact with this call, and we check that the Pound.txt file is actually there. This is just like listing my head, the head of the file. If you were to list the whole file, you would probably find credentials there or anything that has to top of my environment. So yeah, what we just to recap very quickly, what we have, what this shows is how easy it is to poison a pickle, like that kind of attack of replacing the Dunder method can look quite basic. But basically, if you think of a data scientist, for example, installing dependencies on its own environment, it would be very easy to, for example, make a typo when they install, well, any of them. And an attacker could already have uploaded something to PyPy with that typo in mind, or very common packages, for example, instead of fast API, fast AIP. And that package could, for example, replace the Dunder method, and then you would already have this kind of problem. And also how hard it is to detect if it has to poison. Remember that pickles by design allow this security flaw. They need the security flaw to work. It's very hard to mitigate that. So yeah, pickles may not be great, which probably all of you already knew. How can we do that? So one option is to use, to try to build a higher quality pickles, let's say. So there are tools like Scops, which try to mitigate the risk that pickle exposes. Scops is a package focused on secular models, which basically try to cut off a few features built into pickle to basically reduce that risk, leaving just only the few things that I could learn needs. Even after doing that, you better still have risk, but it mitigates some of those risks. Another alternative is not to use pickle. So there are tools like Onyx out there which try to serialize this modeling in a more descriptive format. So instead of just dumping the code and then expecting that something else will load it later, they just describe the model structure. But even then, even if we reduce the risk coming from an attacker running arbitrary code executions, for example, by using Onyx, you would still have a few other risks. So this would not be the end of the story. So for example, here we see a use case from a company called Nutri Security, who basically are a group of their researchers, what they did was try to attack the hacking phase hub or poison the hacking phase hub or poison the supply chain of the hacking phase hub that's how you want to describe it. So very quickly, what they did was to first surgically modify large language models and make it like a tiny change. What they did was just changing what happened was when you query the model who was the first person in the moon, the model would just say during gathering. So it's a tiny change. Everything else would work the same. So it would be incredibly hard to detect. They just, well, they did this kind of fine tuning. They pushed that to the hacking phase hub and as they expected, that model was used by plenty of users.  This is basically what they saw. They saw the same kind of experience. I mean, I do the same thing. I don't check who trained anything in the hacking phase hub. I just, I'm happy that I found what I was looking for and I just use it. But this serves the need for something a bit better. It's not just enough to just build higher quality peoples. So, how do we account with that? So as with many things in MLOps, in MLOps, the answer generally goes back to DevOps. So many times in MLOps, what I found is that the best way to solve a problem is to find the closest problem in classic DevOps, see how they solved it and then apply it to MLOps. Because at the end of the day, we are talking about the same kind of problems. In this case, what we find, if we try to list the things that we know about this problem, is on one hand, it's very hard to magically scan these artifacts to know if they can be trusted or not. So basically what we need is on one hand, to make sure that at the turning point, we use something as secure as possible. So something like scopes, something like onyx. And then through the whole model lifecycle, make sure that we have trust or discard mechanisms that make sure that the model doesn't get tampered with throughout the whole lifecycle. And if you go back to DevOps, what you find about this problem, when you search for these conditions and try to see how they solved it, is basically having supply chain processes, having secured in the supply chain of models, model artifacts in this case. So what we want more graphically is basically to update the architecture that we saw before, and how it would change is basically now at the point of training, either by experimentation or on the CICT pipelines, you want to put that pickling at the R, you want to say that way and put a pat-lock on it. Make sure it never gets tamed or tampered with, and make sure that the person who trained it, who said it trained it, was actually that person, identifying that person. And you could probably say, okay, well, why don't we just sign the artifact? And that would be the simplest option here. So basically, we just signed the artifact. We generate like a public public keeper, we sign the artifact, we then send the hash along the artifact, and we check the artifact. And maybe that's enough in some cases, but in some others, you may ask the question, well, who guarantees that the key that was used to sign the artifact is actually something that you can trust? Or you can go one step forward, you who guarantees that the key that was used to sign the key, you add like a two-step process, it's actually valid. This is basically not in the security space, it's not like the turtle's all the way down problem. This comes from the legend or myth, or however you want to say it, that there is a massive turtle holding the world, and then the question is, well, who is holding the turtle? There must be another turtle, and below that, there must be a bigger turtle, and turtles all the way down. It's a problem about recursion. So, signing the artifact may not just be enough, how do we solve that? Again, we go back to DevOps, we see what tools they have, and luckily, supply chain process is a super well-researched process in classic DevOps. There are a whole conferences about it, and I mean, that's tiny up there, but if you check out that later in the slides, the landscape around supply chain projects in the CNCF is huge. There are so many. So, luckily, we have a few options here. So, how can we apply those to the MLops lifecycle? So, just to briefly describe the main components of a supply chain process, we have, on one hand, we have the most straightforward ones, which are artifacts, which would be obviously in our case, or machine learning, binary artifacts, onyx files, or pickle files, and then we would have attestations. Attestations would just be the actual signatures. Basically, the cryptographic proof that they haven't been tampered with and that they have been trained by the person who said they trained them. And then, on the middle, we would have metadata. And this metadata aspect is one of the kind of gaps that we have in supply chain processes for MLops. So, the components within metadata are generally falling to three categories. On one hand, we have provenance data. So, not just who trained the model, but when did they train it, what training pipeline did they use, et cetera. On the other hand, we would have software below materials, but for models. So, we would have things like what data set was used, what package dependencies does the model have. Here, there is a bit of development. So, basically, we have two organizations looking into this. On one hand, we have Cyclone DX, and then we also have SPDX from the LFAI, looking into how they could expand these existing standards for software below materials to how to adapt it to models. So, these would include things like data set, what data set was used, what package dependencies did the model have, et cetera. And then lastly, we would have vulnerabilities kind of reports. So, this is more common in software space. Generally, when you want to do supply chain, for example, for Docker images, you want to list vulnerabilities that you know about, because it's impossible to fix all the variables that you know about. Because it's impossible to fix all the vulnerabilities, but at least you want to know, you want to say, okay, I know it has this vulnerability, but we shouldn't care about it because it's not relevant. Like, why you could do something similar for models? Will it make sense or not? Maybe it does. So, we have these three components, and then we still have the problem of the troubles all the way down. How do we solve that recursion problem? So, if we look at the projects of the landscape from the CNC, one of the most popular ones is SIGSTER. SIGSTER tries to solve this problem, and in general, the supply chain problem by providing three components. On one hand, we have Foolsia. Foolsia is a component to generate certificates. It's a free certificate authority. So, this is what we would do is to generate the certificates to sign our artifacts. And then we have RECOR. RECOR is basically a ledger that keeps track of every signature that we issued and who issued it, and then how this solves the problem is that when you want to sign the artifact, you use Foolsia, you use to generate that key, and then you use RECOR to keep track of that key. And then on production, when you serve that model, you use RECOR to verify that the key is actually what was issued there, and it's not something that someone just tweaked on the fly like a man in the middle attack. Then lastly, we have SIGSTER connects to all IDC gateways to verify the identity of the person trained in the model. This is how we would make sure that the person who trained it was who they say they are. So basically, if we look back at our architectural diagram, what we would do now is at the point of training, either on the data scientist environment or in CICT pipelines, we would then generate a signature that would then go into SIGSTER. And at the point of serving, we would then verify that signature again SIGSTER again. We're gonna see now a very quick example of how that would look like in practice. So, if we go back to Jupiter, what we have here, the setup is the same as we had before. So, we train a scikit-learn model, same one as the one before. We save it, let's just do it now. We train it. We save it, and we are gonna save it under the good model folder. Now what we're gonna do is sign this artifact. So, SIGSTER comes with a CLI of its own, and just sign it. And now, something that will happen is that it's gonna redirect me to the OIDC gateway that is hosted by SIGSTER. Now, what I was talking before about the components of SIGSTER, so basically, Fools here, Record, and the OIDC gateway, these are quite heavy things that you do want to just do like a quick test. Luckily though, the SIGSTER project also hosts versions of this that we can use for free, which are good enough for demos like this one, or for proofs of concept. So, in this case, we're just gonna log in with Google. So, basically here, what we are saying is, save the artifact with my email address, and because that email address is a Gmail email address, just use Google to verify that I am who I say I am. So now, if we check out the artifacts that have been generated, so on one hand, we have our model.lib artifact, which is our pickle itself. Then we have like .grt, .sig, .sigster. What's encoded here is, on one hand, the attestation for the artifact, and also the attestation of who I am. Here, we're not saving any metadata, which will be like one of the categories that we saw before, so basically provenance, a bill of materials, or a vulnerability report, but that will be like the next step that you would do. We can take it out locally, so basically, to verify it here, we also verify that the identity is correct. It does that, it's okay, and now we're gonna tamper it. We're gonna do the same kind of tampering that we did before. So we're just gonna save a copy. We tamper our model with the same kind of poisoning that we saw before, and now we just validate locally, okay, it fails, good. Next step, this has all been done locally. This is what data scientists would do, or the CI pipeline would do when they turn the model. Next step is to verify it in our production environment. So what we have here is just an extension of ML server, so basically, ML server lets you, the inference server that we're using lets you write run times, inference run times that know how to load your model in run prediction. Here, the only thing we care about is this load method that is responsible for loading our artifacts. So what we're doing here is just extending that load method to verify our signature. And to verify it, I'm gonna go into many details here, but to verify what we do is to just use the libraries exploded by six tors, six tors also comes with a Python package to check that signature. So we have that running in our ML server server. So what we're gonna do next is first, check the models that we have available. So what ML server can see as models, potential models to load is on one hand, our naive model that we trained before, an example before. On the other hand, we have the good model. So this is the model which hasn't been tampered with and which has a signature. And then we have the tampered model which is the model that has been tampered with and has the signature. So hopefully the expectation here is that once, because we have that signature at low time, we're gonna be able to detect that the model has been tampered with and we just unload it. So let's try that out. So on one hand, we load the model that was okay. Everything is good. We now are gonna load the naive model. First, remove the file. We load the naive model. The naive model doesn't have any kind of verification of the signature. So it's expected the same thing as before it happens. This bound txt file gets generated. And now we're gonna load the tampered model which has that signature. So we remove that. We load it and what happens is what we expect that is that the loading just fails because the signature wasn't valid. And if we check that file is not there because if we just stop it beforehand. So all good. Now this obviously is a quick demo like there'll be plenty of questions of how you would scale this into a wider organization. So in terms of next steps, as you have been able to see, there are very few best practices recommended around supply chain. There are very few standards and in fact, there are very few vendors. I've seen the only one that comes to mind is one called Mystery Security which were basically the researchers that looked into that LLM poisoning example. There are no vendors that basically or almost no vendors that basically provide signing at training time. And likewise, there are no very few projects that actually let you apply these policies once you deploy those models. If you go back to the classic DevOps, for example, around Docker images, there are plenty of tools that would just apply those policies automatically for you. And basically by policies here, it would be checking that the Docker image is signed, et cetera. But there is very few, very little here. So there's just plenty of work to do. And this is more of a call to action to everyone to actually get involved in these sort of projects, raise these kinds of ideas or even start projects of your own to kind of raise the concern around, not just around supply chain processes, but the wider ML SecOps space. And if you are interested in ML SecOps, you can always join the, so this is the wiki page for the ML SecOps working group, part of the LFAI. It's free to join to everyone. We join monthly. So yeah, you want to check it out. So basically the things that have been published already was the ML SecOps top 10, but it's always looking into providing best practices as well. So yeah, so with that, I don't have anything else to tell you. So I hope you enjoyed the talk and I hope you have some pincers in Bilbao this week. Thank you. Yeah, I think we have like 10 minutes for questions. So yeah, I don't know if anyone has any question. If not, I'll be available on the whole and I'll be available on the networking spaces. So yeah, there is anything that you want to ask me. Feel free to go ahead either now or later. Cool, so yeah, in that case. Thank you very much. Yeah, I hope you enjoyed the rest of the conference. Thank you.


A slice is a type that references arrays. Each slice value has three components, an address of some array, a number indicating length, and a number indicating capacity. The distinction between length and capacity will make clear shortly. When we create an uninitialized slice variable, the address, length and capacity all start out zero. Attempting to access elements of the slice will result in runtime errors because the slice doesn't have any actual storage. To give the slice a non-zero length and capacity, we use a special built-in function make. The first argument to make is not an expression, but rather the type of slice to create. So in fact, this built-in function isn't really a function, it doesn't take an expression argument, it doesn't take a value, it's a special syntax that takes a type specification. It's not an ordinary kind of function. The second argument specifies the length, and the third argument specifies the capacity. This call to make here will create an array of eight ints somewhere in memory, and then return a new slice value, which references that new array. This assignment here effectively copies that returned slice value to variable a. Now that we have a non-zero length slice, we can use it like an array. However, even though the array pointed to in the slice has an actual capacity of eight, the slice only has a length of five, and so indexes five and above are considered out of bounds. Now if we create a second slice of ints, variable b, we can assign a to b. But be clear that this only copies the slice value, not the array referenced by the slice. Because a and b both reference the same underlying array, accessing indexes through either a or b accesses the same storage. Here assigning eight to index zero of a also effectively assigns eight to index zero of b. Slices with different lengths and capacities are still considered the same type, and so we can assign slice b to slice a here and vice versa. Slices with different underlying types, however, are not considered the same type. This slice of ints is not the same type as a slice of strings, and so we cannot assign one variable to the other. When a function takes a slice parameter, what the parameter receives is a copy of the slice value, not the underlying array. So here when we pass a slice to function foo, the parameter b points to the same underlying array as a. And so this assignment to the slice in foo affects a. The first index of a now has the value negative seven. The built in append function takes a slice and returns a new slice in which values have been added past the length of the original. If the new values fit in the capacity of the slices existing array, the new slice uses the same existing array. If the new values exceed the capacity of the existing array, the new slice gets a new larger array with the values of the original array copied over. Here the slice a has a length of three but a capacity of five. When we append the values seven and eight to a, the array shared by the original slice and the new one now has the values zero zero zero seven and eight. However, slice a still has a length of three. And so if we attempt to access index three of slice a, we get a runtime out of bounds error. If we subsequently append the values 11 and 12 to a, we get a third slice sharing the same underlying array, which now has the values zero zero zero 11 and 12. If instead we were to append three values 11, 12 and 13, the append function will return a slice with a new larger array with the values zero zero zero 11, 12 and 13. When append creates a new larger array, it copies the existing values from the original array. So if we sign 20 to index zero of a before the second append, the new array will have the values 20, zero, zero, 11, 12 and 13. To get the length and capacity of a slice, we use the built-in functions len and cap. Again, an uninitialized slice has a length and capacity of zero. If we append to a zero slice, we get a non-zero slice with the appended values. When append creates a new larger array, it sometimes chooses to make an array larger than is needed for the new values. For example, the new slice created by append here might have a capacity larger than two. Append does this as an optimization. If we append to an array once, we'll likely append to it again, and so allocating extra space may make future appends cheaper if they can use existing arrays rather than creating new ones. When using the subscript operator, the square brackets, we can put inside two numbers separated by a colon. This is the range operator which returns a new slice rather than a single value. Here, a subscript 3 colon 7 returns a new slice which represents indexes 3 up to but not including 7 of the original slice. So this new slice has a length of 4. The capacity of the new slice is 12 because it runs from index 3 to the end of the underlying array, which has a size of 15. Understand that the new slice shares the same underlying array as the original, but the indexes are skewed. Index 0 of the new slice is the same as index 3 of the original. Index 1 of the new slice is the same as index 4 of the original. Index 2 of the new slice is the same as index 5 of the original. And index 3 of the new slice is the same as index 6 of the original. So here, the assignment to index 0 of the new slice effectively modifies index 3 of the original. And assignment to index 2 of the new slice effectively modifies index 5 of the original. We can use this range operator to create new slices from arrays as well as other slices. The new slice here points to the array, but with an offset of 3. If we emit the number on the left side of the colon, it defaults to 0. If we emit the number on the right side of the colon, it defaults to the length of the original slice or array. So if we emit both numbers and just write a colon, we're creating a new slice that covers the whole length. When used on a slice, this is the same as if we just copied the slice by assignment, but for an array, it conveniently gets us a slice representing the array. Like with any other type in the language, we can create arrays of slices. Here we have an array of three slices of strings. The slices all start out as zero slices, so we assign them each a non-zero slice created with make. After these assignments here, the first slice references an array of five strings, the second slice references an array of 80 strings, and the third slice references an array of 30 strings. Just like we can create an array of any type, we can create slices of any type, including slices of arrays. Here we have a slice of arrays of three strings. When we use make to create a slice of arrays of three strings with a capacity of five, the underlying array is then an array of five arrays of three strings. Likewise, if we make a slice of arrays of three arrays of six strings and we give that slice a capacity of five, the slice points to an array of five arrays of three arrays of six strings. In many languages, all local variables are allocated on the call stack rather than the heap. In JavaScript, only closure variables are allocated on the heap because they must live beyond the function calls in which they are created. What's different in Go is that local variables aren't all just references the way they are in JavaScript. An int variable in Go directly stores an int and an array variable directly stores an array. Some Go types, however, like slices, do reference other parts of memory. Therefore, we might encounter situations like this one. The function foo returns a slice which references the local array of ints a. If a were allocated on the stack, the return slice would reference memory that has gone out of scope and all sorts of bad things might happen. The Go compiler avoids this problem by performing escape analysis. When the compiler detects cases where a variable might live beyond the scope in which it gets created, the compiler allocates the variables on the heap rather than the stack. You might ask why the compiler doesn't simply allocate everything on the heap. Well, stack allocations are generally more efficient. The stack doesn't require garbage collection and data on the stack is relatively tightly packed, reducing the need for jumping around in memory and thereby triggering cache misses. Much like JavaScript, Go allows us to create anonymous functions. Here inside the function bar, we create a variable f to be of type funk with two in parameters and returning int. We can then assign to f an anonymous function with that same signature, and having done so, we can then call f as a function. I understand that a function signature, its parameter types and return types, is an integral part of the function's type. Attempting to assign a function to f with a different signature triggers a compilation error. Like with other variable declarations, the type of f can be inferred from its initialization. You might assume that we can declare interfunctions with names as we can in JavaScript, but Go does not allow this. Like in JavaScript, we can immediately invoke anonymous functions. Here the function isn't stored in a variable, but rather just called, and this return value is returned from the outer function. Functions can also be used as return types and parameter types. Here bar returns a function taking two int parameters and returning an int. We assign the returned function to a variable x and then invoke x with the arguments three and seven. If we want to use the returned function only once, we can just directly invoke the returned function without first assigning it to a variable. Like in JavaScript, an interfunction can retain access to local variables from enclosing scopes. Here for example, bar returns a function which retains access to the local variable a of bar. So when we invoke this returned function multiple times, the same variable a is used for each call. If we call bar a second time, we get back a function with the same code, but with a separate variable a. So calls to x and y here are using a different variable a. A variadic function is a function that takes a variable number of arguments. In Go, the last parameter of a function can be a slice especially denoted by three dots instead of square brackets. The arguments for this parameter are zero or more elements which get passed as a slice. Here for example, the last parameter b is a slice of strings denoted with three dots. When calling the function, we pass zero or more strings at the end and these arguments become the values of the slice. If a function returns multiple values, the function can be used to provide arguments to a variadic function if the return values all match the expected type. Here we're calling foo with four strings, the first three returned from the call to bar. Code in Go is organized into namespaces called packages. Each package is known by a name, usually a short single word, and an import path. The import path can be any sequence of characters, but by convention, the import path should be a URL pointing to a git or mercurial repository containing the source files of the package. By convention, the last part of the import path matches the package name. Here for example, we have a package named foo with the import path github.com slash bryan slash foo. When you install the Go tools on your system, you should set an environment variable GoPath to a desired working directory. In the GoPath directory, package source directories live under a directory named src. So for example, if on windows my go path is set to c colon slash go code, then the source files for a package with import path github.com slash bryan slash foo c colon slash go code slash source slash github.com slash bryan slash foo. In a package directory, each source file should end in the extension go, but the compiler otherwise doesn't care what we call the source files. At the top of each source file, we put a package statement naming the package, and after the package statement, we put one or more import statements naming the import paths of the other packages we wish to use in that source file. For reasons of compiling efficiency and imposing clean code structure, Go does not allow package imports to be circular. For example, if package a imports package b, then package b must not import a. When compiling a package, it's more efficient if all the other packages that imports are already separately compiled. Circular imports would create situations where that isn't the case, and so they are not allowed. When using elements from an imported package, we prefix the elements names with their package name and a dot. So if we want to use x from imported package foo, we write foo dot x. Only names starting with an uppercase letter are public, meaning visible to other packages. So anything you want to expose to other packages should begin with an uppercase letter. Here finally is the Hello World program written in Go. A compiled Go program starts execution by invoking the function named main in a package named main. To print a standard output, we use the function print line from the format package, spelled fmt. Notice that the import path of the fmt package is simply fmt. For convenience, the standard library packages have short import paths like this. Your own packages though should follow the convention of using repo URLs for the import paths. At the top level of code, you can only have these statements package import var const funk and type. All other kinds of statements can only be used inside functions. A source files package statement must proceed all other statements, and the imports all come second after the package statement. In general, Go doesn't care about the ordering of the rest of your statements, except in some cases your global var statements, as we'll discuss later. Looking now at how a real world Go program is structured, here's the github page for an NES emulator written in Go. The main package has the import path github.com slash fogelman slash NES, and the two other packages of the program, NES and UI, have import paths that are subdirectories of the main directory. The project also includes one other sub directory for a utility program that can test the validity of ROM files. Because that package is compiled as a separate program, it too must have the name main. Again, understand that the names of the source files beyond the extension dot go does not matter, and how we split our code into separate files within a package also does not matter. Those all are simply matters of stylistic choice. Also understand that each import is visible only in the individual file. If you want to use an imported package in every file of another package, you'll have to import it in each of those files. By default, an imported package is known by its name, but you can choose a different name. This is useful when a package name is too verbose to type or when it conflicts with some other name. Here, the NES package is imported with the conveniently short name N. Each package can have a special function init for doing any setup work which the package needs to do. If the package has a main function, the init function will always run first. When a package is imported by another, the compiler guarantees that the imported package is completely initialized before the local package. Global variables can be initialized by arbitrary expressions, even expressions that use other global variables of the package. Here, for example, the initial value of a depends upon the initial value of b, and the initial value of b depends upon the initial value of c, even though a is declared before b and b is declared before c. The compiler will figure out the appropriate execution order here, so we can write these declarations in any order. Whatever that may be, the variable initializations always run before the optional init function. In some cases, the compiler actually cannot sort out the order of global variable initializations because doing so is logically impossible. Here, for example, the relationship between the variables is circular. a depends upon the value of b, b depends upon the value of c, and c depends upon the value of a. The compiler will first complain that it can't infer the types of these variables, but even if we explicitly declare the types, the compiler will then complain that initialization goes in a loop. Also, watch out for cases where the order of global variable initializations depends upon the order in which they are written in the file. Here, both a and b are initialized by calls to foo, a function which increments and returns global variable c. First, the variable c gets its initial value, then a is initialized by a call to foo, and last b is initialized by a second call to foo. Even though c is initially given the value 2, after the two calls to foo, it will have the value 8.


The following is a presentation of TFNN Trade what you see with Larry Pezzavento Call now toll free at 1-877-927-6648 or internationally at<PHONE_NUMBER> Now Larry Pezzavento Well, I started out the show like we usually do looking at the German Dax Before we get into the other parts of the German Dax and a few of those I want to show you the German Bund And other things I would like to mention Someone in fact I had two One email and one phone call today from people giving me inside information of what's going on in the world Well, I'm gonna share that with you But before I do that, I want to tell you that I've been in this business for Seven decades and see 15. Yeah, seven decades. Yeah, well, this would be my 10th decade 59 60 60 Wow a long time you know, I have never gotten a piece of inside information that worked. I mean zero never nada bupkus nothing the inside information is That there is Trump is going to sign the Hong Kong bill supporting the protesters and when he does that China is going to put the kibosh on the trade deal now If you believe that I still have two shares of the Brooklyn Bridge left Let me explain one other thing that I remember very very vividly about my days at Drexel every Monday morning They would have a stockbrokers meeting and of course it would have a really nice Little Danish buffet and stuff. So everybody in the office went there were four of us in our in our commodity department And there were there were some support staff there and each each week They would try to you know to sell that this sell the shares that their own their own their own deck had like The the broker for Bob Hope was there and he always had things to sell and so You know, they would sell things and you know say well if you can sell a Amalgamated copper or whatever it is just go ahead and do it. Anyway, that's that's needed here today So I was thinking of the movie if you remember Wall Street from 1987, you know Gordon Gekko how he would call the Wall Street guy and says blue horseshoe loves anacot steel and That kind of stuff and believe me if you don't think that stuff goes on it goes down all the time In fact, that's two calls. I got today is probably exactly that this particular day They put a special announcement out that resorts international, which was a big Hotel conglomerate that was going into gambling and it had been going crazy It's been going up and up and up and had some wild swings and everything and said that if you want to have any customers That want to short resorts international, they have to put up 200% margin It was not a not a burp not a movement in the room about it and I so I asked myself Why are they doing a Bob and he he said well He said we're worried about the speculative fever that's going on in resorts international We want to perfect protect our customers. I said, okay, that sounds good I walked out and I went over to the machine and I pulled up a chart On resorts international and you could get some pretty good charts. You couldn't get into day But on this particular chart resorts international had an absolute beautiful three-drive Three-drive to a top pattern. Yeah. Yeah, I was there from 76 to 82 76 to 82 and Yeah, Drexel and so I looked at it and I said, yeah, that's pretty good So I when we finished I went over to I went over to Bob said I want to I want to sell 100 shares of resorts internationally said well, I Highly recommend it, but if that's what you want to do, you know, go ahead and do it So I went into the wire room and I explained to Neil the wire operator what I wanted to do I said when I sell 100 shares resorts international at a price and I put a stop in of about six dollars It was trading at about a hundred. I don't remember. It was over a hundred bucks a share And a few minutes later Bob 15 20 minutes later Neil came back and he said I just thought you'd like to know he said but six other brokers That did the same order you did and I said what and he said, yeah And I said, oh my goodness anyway as luck would have it The resorts international got hit with a little bit of bad news and it dropped like 14% In a matter of a day and a half and you know, they always joke to me about that But the only reason I did that was that they were telling you that something's wrong if you remember the silver ball bull market in 1980 What happened was the directors of the comics exchange were heavily short silver and so they were really getting cream So what they did was they restricted short sales, okay?  So that basically put the end of the bull market So you've got to be aware of some of these things that these people put out and always be aware Be very suspect especially nowadays folks the way the The way the news comes out. I mean, it's just Ridiculous, so I mean we we saw something yesterday about Hong Kong. It was so totally false that it was it would defy Imagination so anyway, just remember that that's what's happening. Okay. Now. Let's move on to a couple other of these charts Yeah, hey, don't believe it until you see it on the charts folks.  There's more sellers. That's basically the bottom line So keep in mind. That's what That's what you're looking at. So pay attention to that very very interesting as we say this morning All right, we looked at the DAX chart the next one We want to take a look at is we're going to take a look at the DAX chart on a 60 minute chart This is a little different. You'll see that this one has been in a correction here. Oh They want oh Marshall wants Okay. All right, Marshall since we have a little time Marshall wants to know How Sarah and I met I was on an airplane going from back from China through Hong Kong into Nerita Japan and there was a lovely young girl sitting in front of me and As we left the plane she had a hard time reaching her luggage, you know that dread goes Please sir help me with the luggage and so I I said didn't I saw she was rather sad and I said, you know What's wrong and she said well my mother is at the end of her time and I'm going back to Canada and I'm you know, I'm just very sad I said why don't you come into the lounge with me and I said well, we've got three and a half hours before we Take the flight. She was going to San Francisco. I was going to LA and so we went in and I had my laptop And so I put up a shorter what I did and stuff like that And I was using all the good Italian moves that I could possibly do I put on a clean shirt I combed my hair and so we started talking about the stock and she was in AIG And so I looked at the start chart of AIG and there again was a beautiful three-drive to a top pattern at 72 and three-quarters and she says well, I've been thinking of selling it And so she sold it. I thought it was under 72 and three-quarters 72 and a half maybe whatever it was It went to 36 cents Anyway, yep, she married me for my charts.  So you know what? What how nice and lovely she is anyway, that's that's the story about that so By the time by the time she got to Toronto I had already landed in Los Angeles and her sister swore that she was being stalked And so Sarah asked me if she was being stalked and I said most definitely All right, let's move on here. Okay. Oh, we won't buy the first break. You guys are great You got me through the first break with no damage. This is good. This is good Let's bring up another chart here to take a look at it because we want to watch a few of these others that that look pretty interesting Especially the natural gas chart folks. We'll get back to that when we come back from our break If you're not currently using the Taz profile scanner when looking at setting up your trading opportunities Then your arsenal is short a mighty weapon The Taz profile scanner is a standalone piece of software that instantly filters over 2,500 global financial markets such as stocks ETFs commodity futures and forex headed by Steve doll Taz Understands that in today's technological world the use of top-flight software applications and technical analysis Expertise is essential to successful trading in today's market You also gain access to the webinar that Steve doll and Tom O'Brien just hosted the best way to use the Taz profile Scanner to profit this webinar archive is available for all subscribers Immediately upon signing up all new subscriptions also come with a 30-day money-back guarantee So you have nothing to risk start your subscription by visiting the front page of tfnn.com today And you'll find the Taz profile scanner under the services tab sign up today Are you in the market for buying or selling real estate in the Bay area including the surrounding St. Petersburg Tampa and Clearwater markets Tiger real estate LLC is a firm that has extensive experience in the Tampa Bay area Whether you're looking to sell your current property for maximum value or you're in the market for a second home or investment property Tiger Realty has the experience across all areas of real estate in the Tampa Bay area to help buyers and sellers make the most informed Decisions across all price levels from the price you should be paying per square foot in certain up and coming areas to the type of cash Flow investment properties are capable of creating Tiger real estate can help you make the best decision when it comes to all areas of the market Before you make one of the biggest decisions of your financial future call Tiger real estate LLC today at<PHONE_NUMBER> Or email us at Tiger at tfnn.com that's<PHONE_NUMBER> Call us today Many of our new listeners have heard about the Tigers Den the Tigers Den is a lively community where professional traders and investors can meet Exchange ideas and information in a comfortable moderated atmosphere here all of the TFNN shows plus see all the charts as they happen live and Have access to archives of all of those charts You can test drive the Tigers Den absolutely free for 30 days and greatly enrich your knowledge of these markets And how to make your money work for you details on the Tigers Den or on the front page of TFNN.com TFNN has launched our brand new website You can still visit us at the same TFNN.com URL But when you do you'll see a new and improved homepage with a much simpler navigation Whether you're watching Tiger TV live in high definition or just accessing your newsletter subscriptions We even have new pricing in six months and yearly options Check out the new TFNN.com now and experience all the upgrades TFNN.com educating investors Now toll-free at 1-877-927-6648 internationally at<PHONE_NUMBER> Okay, folks before we do the natural gas. Let's talk to Tim in Cleveland, Ohio Tim. Are you there? Yes, indeed. I am Larry. What can I help you with my friend? And before I'm wondering you live in Tucson, right? Yes, sir. I sure do Yeah, do you happen to know Tito Francona the manager of the Indians? I have met him a few times Robin Ventura who manages the Chicago White Sox actually is a very good friend of the family and my daughter used to babysit for One of his four kids when he was he lived in Santa Maria He was a he was a star he moved from high school right into the Majors when he was 18 and he played for you know 20 years for the White Sox and Yankees and so I I met him through Robin Ventura they had a Oh, it's an old-timers thing here at the University of Arizona and Robin was there and I and I met him once He's a really nice guy and he could run for mayor. He'd be elected 99 to 1. I mean he's he's just everybody loves him Well, I know Francona I think he plays a lot of poker and I know you you're interested Yeah, yeah, oh, yeah, he and I play a lot together. I'm what I'm on TV watching him play. I play I'm very low limit I play usually I play 4-8 Texas hold them which is four dollars eight dollars You can buy in for a hundred dollars But I like to play in the tournaments because you buy in for 50 bucks and if you win you win six or seven hundred So you got a nine-to-one, you know, chance a payout plus, you know, if you're not bad You know, and I only play really good cards and I pay attention to what's going on So I do win but not a lot, but you know, it's entertaining to me, but no those guys are in a totally different Totally, I know I see him on TV and I watch him and I played against in the tournaments with some of them I mean, but I I have not I'm I'm not a I'm not anywhere near that level and I don't want to be I love doing what I do. They can't do what I do and I think and I can't do what they do So it all all evens out I think I was more interested in whether you had actually played with the Tito Francona the Never never have no, I see I've seen okay. Yeah, I've seen you on TV I never played poker and I did meet the gentlemen But I don't know haven't played with him. No, okay those guys that I don't play in those games They're just they're just too high for me and okay Well, Larry up against something that I haven't run into quite often and I'm hoping to tap your expertise on this I actually own TD Ameritrade and of course it was announced today that Schwab was buying it and what the editing price ends up being when The deal is done. You could See if you could apply some of your techniques to give me some idea of how much I might be able to squeeze out of this I would tell you what I'm gonna give you my two cents worth and that's exactly what you have to pay for it Tim, okay Two things first of all, I don't know if you know this or not, but Charles Schwab the original dude He bought u.s. Steel from Andrew Carnegie in 1929 for 450 million dollars, I believe Okay, it took him. I don't remember something like 28 years or something to recoup his investment, but no one really knows what actually happened Personally, I do not like Charles Schwab and I'll tell you why when I moved here to Tucson in 94 I was only here about six months And I was giving a lecture at the University of Arizona in the Stuart Udall School of Business Management And the director of the school of that department came up to me and said he had a problem And his problem was that the his secretary I had a count with Charles Schwab and you know They had done some things that he didn't think were right and he asked if I would look at it And I did and it was really flagrant and I had done I had done over 30 cases as an expert witness So I'm not I'm not a rookie when it comes to looking at accounts, and I knew that this was really bad and so I I went down to see Charles Schwab with an attorney that they had hired and we tried to talk to them And they said oh this is you know totally wrong and I I said All you have to do is go to arbitration. I said this is a flat-out no-brainer. I said, you know, you're not gonna lose this case It's impossible to lose this case and so they did and they won So I don't really you know in Charles, you know Charles Schwab didn't even have a legal department This was 94 they didn't have a legal department They jobbed everything out to people who didn't know what they were doing So I don't have a lot of faith in the Charles Schwab. They're you know, they're very successful in everything But I would I would take every chance I could get to get out of that before it becomes part of Charles Well now that's my two cents worth and I'm sticking to it, but that's all you're gonna have to pay is two cents Tim Well, I thought you might be able to see some type of Fibonacci number that oh, oh, you know, I never thought I look at that'd be a good idea You know what that we know what the symbol is for TD Ameritrade am TD am TD? Okay, give me a second here hold on a second. I'll get this up here and since you're kind enough to say it's gonna I'm switching data here. So a A am TD, okay, I got that go to daily and let's see if we can get this thing up and take a look at it Oh, it's gonna take me a little bit longer than I wanted to but Where's it trading right now Tim? On the pre-market, I think it was 51 and 25 something like that. Okay. Let me give it. It should be ready now Let's give it a am TD. There it is. All right, and let's see where it is It closed at 41 now. It's at 51 Oh, this has been in a big downtrend I'd run for the hills on this puppy It's a much weaker than market stock and you're trading exactly at the 78 percent retracement of the whole year's range from 2019 at 51 and a half Okay, so it sounds like right here is a good.  Let's look at the weekly just for heck I want to put the chart in here. Let's just watch this here. Oh, this is this is a while I can see why they're buying it because it's cheap But I I frankly hold on one second here Tim and let me get this up here so that you can see it They're giving you a 25% Bonus for buying it or for selling it. You know what I mean and the the long term Oh, you're right at the long term 618 here at 51 71. I would be I that's my two cents worth Okay, let me ask you a question. Would you rather be long or short this stock coming in this morning? I was actually thinking about shorting it after I sold it actually No, I I think that they're probably you know, they overpaid for I'm gonna be quiet. It's what was that quote was it's better to be quiet I thought a few a fool did to open your mouth and remove all doubt I think that was Charles Dickens, but I'm not sure but anyway, good luck to you with it my friend I hope it I hope it works out I'll start looking at it and if he keeps going up forever and you're welcome to come out to Tucson for a free lunch Hey, I may take you up on that. I was thinking about coming up that way anyway, so Recorded that you're gonna buy me lunch, okay? Donald's right across the street, so we're in good Thanks for coming us and a happy Thanksgiving to you and your family Happy Thanksgiving to you and your family as well. Thank you very much. I really appreciate it folks folks when I share these stories, please take them with the This is going back to history and stuff and that's really what I'm you know paying attention to so if you'll just keep that in mind I hope that It helps out We'll be right back after we take this few minutes for from our sponsors eight seven seven ninety seven six great Larry Pezzavento has just started his brand new service Fibonacci 24 7 and he's already delivering content to his subscribers on a daily basis when the markets opened and even on weekends Each Monday you'll receive Larry's written report that provides detailed commentary and a summary on the charts and videos that Larry sends out and Throughout the week when warranted Larry will send out via charts or videos or both the key markets that he is watching during the day This will be up to the date active trading information that will help you in your daily trading in Larry's first week alone He sent out 25 charts six videos and a full report to his subscribers in just one week If you're a technical trader that uses patterns and retracements to trade then Larry's service Fibonacci 24 7 is something that you must try right now new subscribers can get a full 30-day money back guarantee with nothing to risk sign up now to Larry Pezzavento's Fibonacci 24 7 by visiting the front page of tfnn.com under trading newsletters The path of least resistance is David White's daily trading newsletter And if you're looking for active trading ideas then now is a perfect time for a 30-day free trial to this powerful daily trading advisory service David uses his years of trading experience to offer his subscribers his trading ideas each morning in his path of least resistance newsletter Using a combination of equity trades along with options David keeps his subscribers up to date with all pertinent market information with intraday afternoon updates when warranted Don't miss out on this great chance to get a 30-day free trial to David's daily newsletter The path of least resistance with no obligation to pay anything David has been delivering solid recommendations for his subscribers recently And if you'd like to see the type of newsletter He delivers every morning then visit the front page of tfnn and you'll find the path of least resistance under trading newsletters For all the details and to start your 30-day free trial today log on to tfnn.com now Tfnn is excited about our new software charting program the art of timing the trade charts in Collaboration with Tom O'Brien and using his best-selling book the art of timing the trade your ultimate trading mastery system David White has programmed an Outstanding piece of software that will complement any traders methodology using this first-of-its-kind program The art of timing the trade charts allows you to scan thousands of stocks for Fibonacci formation setups including guardleaf ABCs Butterflies and much more the art of timing the trade charts is designed to help you when scouring the markets for stocks Just beginning to form the trading patterns that many investors spend days weeks or even months Searching to find and right now we're offering licenses available at only $79 a month we are so confident that you're gonna love this new charting software that will even give you a 30-day Unconditional money-back guarantee don't miss out on this incredible new piece of software Get your copy of the art of timing the trade charts today by visiting tfnn.com This segment is brought to you by think or swim for more information Just click the think or swim banner on the front page of tfnn.com Okay, folks, I'll get on to bonds here in just a second But mr. Z's asked a question about how I got started doing expert witnessing It was in 1985 after I had left a commodity corporation. They gave you a six-month leave I was never thinking of going back because I was going through a divorce and my good friend Eddie Horowitz was an attorney And he was handling stuff for Gibson Dunn and crutcher Kiesel young and Logan and a couple other law firms and he needed help on some cases And so he asked me if I would help and I said I'd be more than happy to it was $150 an hour plus expenses So it was really easy money and all we had to do is go through the P&S statements talk to the brokers and figure out You know what was happening? And so I did a total of 30 cases Over a period of about four years and I won every case except one and that was the case that I was 110 percent sure that I was going to win and what happened was the the guy had lost a lot of money But I'll tell you that story to some time But anyway, that's how I got started doing it and it was it was really It was really really fun. I had one I tell you two stories at the store The the the case that I lost was with Kent Duncan. He had done Ken Dunn records and he had 72 gold out golden platinum albums. He was a producer.  It was just really amazing and Ricky Nelson anyway, it was just a And he had been he had been trading the Japanese yen at Bateman Eichler in Santa Maria with a broker there and He was doing pretty good and I had showed him little ABCD stuff And so he really got involved in it He was trading and making making a lot of money He's making 20 30 grand a month trading to Japanese yen and then his father passed away And I called him and we were pretty good friends and I told him I said please stop trading Ken I said because you know when you have a death in a family like that I mean you just you just never do well when that happens and he said okay, I'll stop trading well He didn't stop trading. Anyway, what happened was he got into a situation where he'd ran his account up to four $490,000 he started with about a hundred grand and then he got it down to zero and So he came to me and showed me what happened and his broker was just churning the hell out of it I mean he was just really This was really bad and anyway, he went through the whole thing and we went to the court and Excuse me to arbitration and the arbitration said look this guy's in a record business.  Well, anyway We were remain friends that he stopped trading and then about a two or three months later Now maybe it's maybe six months later. He we were out to dinner and he said, you know I got a settlement from my from my dad's estate today and I said, that's really great I'm glad to hear that. You know, he didn't need the money. He said Larry He said you want to guess how much it was and I said, I guess it's within about 25 cents of how much money you lost Trading the Japanese yen and he said no, it's about ten dollars difference And so folks if anything happens in your life where you've got a divorce or a death in a family for God's sake Don't trade commodity corporation had a full-time psychiatrist on the staff for stuff like that So it's very very important. Just let's remember that. Okay. Now get on to the Bondolis. It's very very important in the Bondolis We want to look at these very very closely I did a whole chart on these puppies and I want to be able to see if I can find this chart that I did and Then when we go because we hit a major major number up there Last night as you guys were sleeping in where did I put it? Where did I put it? Where did I put it?  I marked these up I put the names on them and you haven't got so darn many of them that I can't I can't find the darn things. Oh shucks Don't got it. Anyway, but when we hit that number last night in the Bonds at 160 30 I've got to find this chart because that explains the whole thing in bonds I mean, it's just so easy to see if you can look at that and I What time is it? We got four minutes to do it. I'll do it on the next run around. Oh, you know what? I'll do I've got time here since this is our show Let's just go up here and we will get up here to the old Bondolis and get them up here And I know I've got it on file 40 I knew it was an hourly chart is this it up by the ping by the boom We are there. That's not fair. Hold on. Just a second here get the right chart up There we go. There we go. There we go. This is it Okay All right, this is it. Let me see. This is still a very various chart by the way Just give me a second here boys and girls Okay, here's the bonds last night when we hit 160 30 I want you to look at something very very important folks because you see where it says 1.618 there Okay, that's the 1.618 expansion from the low that we had on the seventh up to the 13th And then you see we went sideways for three days 14 15 16 17 Then we took off measure that a bcd leg and it's going to take you exactly to 1628 which is this 1.618 expansion. It is also the 78 percent retracement from November the first We're already down a little more than a handle already this morning So this is still a various chart. Look at the look at the lower tops. Look at the lower bottoms There's trouble in River City in the bond market boys and girls. So pay a clinch into that pay attention to that I think it's something that you really need to do. Anyway, that's my two cents and I'm sticking to it I hope that helps with the bonds. All right. Let's move. Let's see if we had another question in the den here Okay, let's move on to something here. I want to talk about here. We had a very nice One second here get this out of the way move this over We had a very nice chart from one of our listeners And I want to bring it up to you to let you take a look at it and you'll see here. This was his Chart of wheat. This is the march wheat contract and there was his reasons why he did all these things He had like 13 different reasons to buy the march wheat It's got a nice profit in it as you can see And the and the two things folks when you've got a black background like that That's not good commodity corporation Also, you know did some work on that and black backgrounds are not good make it muted or white or something But don't use black That's my two cents and I'm sticking to it. All right, let's take a look at that wheat Now what I suggested to this young man is that you've got, you know, something that looks really good here But you just got two dog gone many lines I just doesn't you could do it with a whole lot less lines and it would about be a lot easier to say a lot easier to see So what I suggested him to do was to just go and look at it And so here here's march wheat on a four-hour chart and we'll get up here and take a look at that And I know some of you did this trade because you'd already emailed about it. Look at this You have a beautiful remember this is over two weeks from the end of october To the 17th of november. Look at that. Look at the nice little a bcd pattern and look where it's setting It's set in a 61 per cent retracement of the nova september low You got a beautiful a bcd perfect in price and time at 504. It's now up You know 750 bucks So that's the easier way to do it now You know, if you're good at using moving averages and stuff like that like The steve roads and basal chappan and tom can do then that's great But if you're new at doing this then don't uh, don't worry too During worry too much about it and you know, and if you did this you can certainly reduce the number of reasons to buy The trade from about 13 all the way down to three But if you want to use 13 then that's okay, but remember you're the one it's doing it You know, I'm just giving you what I see when I'm looking at the pattern So eight seven seven nine two seven six six four eight If you are in the cd market and looking for a secure investment The tiger first mortgage program may work for you The security for these first mortgages are building lots in the tax opportunity zone in st. Petersburg, florida The tax act of 2018 set up tax-free zones across the country where you can build and hold for 10 years And pay no tax on the profits which makes these lots valuable The investment is anywhere from 30 000 to 75 000 The interest paid is 7% yearly paid on a monthly basis According to bankrate.com the best rate for a four-year cd in the country as of february 20th is 3.1% A $50,000 investment at a normal four-year cd rate of 3.1% would give you income of 1,550 per year or 6,200 over the four-year period that same $50,000 investment in the tiger first mortgage program Would give you 3,500 per year or 14,000 over the four years What should you prefer 6,200 or 14,000 of interest on your investment? If you would like more information about the tiger first mortgage program You can call me at<PHONE_NUMBER>. That's<PHONE_NUMBER> If you're a trader in the market looking for exposure to gold or gold mining equities Then now is a perfect time to sign up for tom o'brien's gold report. The summer is over Gold is trading back above $1,500 and the 10-year treasury is hovering at around 1.5% Tom o'brien has been writing his weekly gold report for almost 18 years There's no one that knows more about how the gold market trades and how gold mining equities react New subscribers get a 30-day money back guarantee. So you have nothing to lose Every monday morning tom publishes his weekly gold report with coverage of gold silver bonds the xa u hui gdx the dollar as well as more than 30 different mining equities as of september 3rd Gold report subscribers have five active open positions with an average Unrealized profit of almost 38% for each position to see for yourself the types of profitable trades that are recommended within the gold report Sign up today by visiting tfnn.com Will the s and p 500 continue to climb for bold trades on us large cap stocks in either direction trade spx l sp u u or sp x s Directions daily s and p 500 bull and bear Leveraged etfs Direction leveraged etfs an investor should carefully consider a fund's investment objective risks charges and expenses before investing A fund's prospectus and summary prospectus contain this and other information about direction shares to obtain a fund's prospectus and summary prospectus Call<PHONE_NUMBER> or visit direction investments.com a fund's prospectus and summary prospectus should be read carefully before investing An investment in the funds is subject to risk including the possible loss of principal The funds are designed to be utilized only by sophisticated investors such as traders and active investors distributor foreside fund services llc The bull bear trading hour with tom and tommy o brian next Okay folks tiger from the tfnn room asked me a question is since we missed the Overnight it happened in the bonds at that 160 30 area. How would I enter the trade? Folks one of the people that I highly respect tom hugart. We did a seminar with him in september in the uk and All I did for my seminar was to look at what tom had done making what he had made And I'm just going to show you a picture here. This happens to be the dow Jones. I'll get this up here. Oh, I guess I'll have to Well, I've got him. I've got to take a picture of it boys and girls. So give me a second here. How do I do that?  I think this will do it Let me go to this top. Uh, that's not gonna work. Yeah, maybe it is hold on Anyway, basically what tom does is he trades thrust in the market And I want to hopefully I've got this doggone thing that'll come up here We'll take a clutch get popped up. Very good. Let's get up here. Let's hear So here is what he does. Let me just get a thing up here. All right, and I'm gonna have a little question here All right, here it is. This is the uh, this is the s and p not or excuse me the dow Jones Just consider this is the bonds. Okay, because that hasn't happened in the bonds yet You see you have the top up there and you miss the top. Okay. It comes down and it rallies up. Okay Sell that 382 retracement That's what you what he does he sells the 382 retracement and then he presses it when it goes below the low Where you measured the 382 in other words, you go from the high down to the low up to the 382 Once you break the 382 retracement He starts pressing now. He's already pressing right now. He just posted this and so I just want to see what's that We have an extended bar. That means, uh, you know, it's heading down a little bit at least a short period of time But that's that's exactly what he does. I did a whole thing one two full days On this and it's an incredible thing to look at folks. It really is go look at it like defy human nature Prove it to yourself. That's what I would suggest you do now. Here's the question here I want you to tell me how many points points That tom made trading the dachs in 2019 so far Can someone guess how many points he's made? Not dollars just points how many points has he made trading the dachs Now he's published this so it's not a it's not a mystery No bill. It's higher than three It's higher than 2000 or 2019 Is the year and we're in november so we got five weeks to go And anyway, you you want to guess it's more than 500 and it's more than a thousand And it's more than it's more than 2000 You ready 14,000 Points trading the dachs for 2019. That's plus. That's not counting. That's counting the losses. That's net So that that so he is definitely in the class of a super trader So and he'll be he'll be in tomorrow, but he's very humble He shares what he knows and but he's good, you know, he's he's he's does things that People do to get it right. So we'll see No, no Mike Mike. No, no, no, no, it's a total points not not from up and down It's up and down He uses the dach. He uses the futures on the he uses cfds contract for differences is what he used bill In the year in europe, they can't trade us futures. So they use cfds. That's contract for differences It's exactly the same thing what they do is they bypass The nfa and the cftc And that's that's why they that's why they do that So those are just a few things to to look at but I would highly recommend you take a look at what he does Because all you have to do is to go to Trader tom and he'll send you his book. He outlines pretty much what he's doing. He's selling strength And uh buying week or excuse me. He's uh buying strength and selling weakness. That's what he does So whether that means much or not. I don't know but that's the way it goes Okay, let's uh, there's the old bondolis. I want to get this up here. Here's the german bund if you remember here way back in august We were making those multiple abcd patterns on a long-term daily basis Turned out to be the right thing. We've gone from 180 all the way down to 169 We've had the same rally here. See the rally here that we had in the bonds That's almost exactly what we did last night in the in our treasury bonds. You can see that 0.84 as It's just a shade off at 0.786 for trading purposes are almost exactly the same thing And so that's what we're watching here But the bond problem there is a problem in the credit markets. I don't think there's any question about that. So we'll See if that helps at all. Okay, let's move on I want to talk about losing something and that is something we need to pay attention to a lot of times And I think this is it We've been talking about the little piggies and we were talking to those with ruby yesterday about that This is christmas. These are christmas hogs and as you'll notice here They opened they they opened slightly lower and and I When we were on the air when that happened and that was at 60 61 and change 6155 or something.  So Don't don't pay any attention to the news And then this is why I'm a technician folks You know, it's because I I've been there done that been bitten on the kabuki. So it's not fun So just remember when the news is not good and prices go up, that's a really bully sign. Okay Pork bellies that no the pork bellies are gone. They used to we used to love trading those anyway Well, it's it's been around for a long time terry this stuff, but it's just getting totally out of control I mean, it's just I've never seen it as bad as it is right now Now I want to share with you something from our le way boys that They're looking at some things here that I think look interesting Since we were talking about the bonds I want to get this up here because I think this is where the inherent problem is going to be If we do get into a Correction here You can see here at the top there where it says see you later risk taker Well, you can see the abcd pattern that they mark there abcd and at point d Okay, that abcd folks is a three drive To a top pattern and if you can see the abcd at d that is a butterfly pattern Okay, these are all extension numbers up there. So They keep a keep close eye on it. So I think when it comes it's going to be They there's so much complacency in the market out there when if it does come and I don't know if it will or not But if it does, you know, it's going to be They're gonna they're going to spank some people would be my guess you want to be The spanky you don't want to be No, you want to be the spank or not the spanky when you do this Keep your loss of small let your profits run Uh, remember tomorrow, we're going to have a tom who guard is going to be my guest tomorrow We'll have a chance to chat with him Can ask him questions probably he'll probably answer without too much trouble. He's very He's quite humble actually and he's got a lovely family and everything Uh, how can someone tell me how the td ameritrade is a trading? I want to know if tim and cleveland's ever going to speak to me again It is a family show you bet you I Okay, that's okay, you know folks I've been doing this for 12 years now and I have never If I have slipped, I don't think I've ever I've never said any curse word It's a trading at 49 81 And it got out at 51 tim send me commission I'm certain you are or strive to be one of the best of the best at everything you do in life It's the most common trait that we tigers and tigers share If you're looking to become the best of the best when it comes to managing your money Let me teach you to do what most wealth managers tell you can't be done Which is how to time the markets I'm steve rhodes author of mastering probability and for the last 12 months Timer digest has been tracking my newsletter signals Which have earned me the ranking as their number one market timer in the nation for the s and p 500 for the last 12 Six and three months timer digest also ranks me as the number one market timer for gold as well The fact is markets can be timed and I'll teach you the exact set of tools that I use That has transformed me into one of the best at what I do sign up for mastering probability today By clicking on the newsletter tab on the home page of tfnn.com and get immediate access to workshops Where I take you step by step how to use an extraordinary set of tools as well as provide great market calls to sign up today If you haven't checked out the newsletters page of tfnn.com What are you waiting for all of the tfnn newsletters are informative up-to-date Affordable and it must have for every trader looking to gain a competitive Informational edge in today's markets tfnn newsletters cover every aspect of the markets to offer you the very latest in market news Plus new subscribers get to test drive our newsletters risk-free for 30 days From all aspects of the markets including stocks bonds metals commodities and tech There's a newsletter to fit your needs exclusively from tfnn Stay informed each day you trade and get the competitive edge that will help you stay ahead of the game Visit our newsletters page by going to tfnn.com and click the newsletters button near the top of the page tfnn.com educating investors Since 1984 basal Chapman has been using the Chapman wave methodology to advise traders of his expert market opinion While originally hand drawing charts from the late 1970s into the 1980s Basal noticed that prices under most circumstances virtually always had a certain number of legs to the upside before declining sharply Later basal found that computer software which included the standard market technical indicators enhanced the degree of accuracy and calling price turns as well as market trend calls Thus was born the Chapman wave sequence Using the Chapman wave methodology along with other indicators basal Chapman advises his subscribers of his expert market opinion Each market day with his opening call newsletter right now You can get a two week free trial to the opening call basal's daily trading newsletter by visiting the front page of tfnn.com Cancel at any time during that trial and pay absolutely nothing Get your two week free trial to basal's newsletter the opening call today by visiting tfnn.com This segment is brought to you by thinkorswim For more information just click the thinkorswim banner on the front page of tfnn.com Okay folks we're back and i'm going to put up the chart by golly The TD Ameritrade actually is uh has has sold off of that hold on let's get this puppy up here Uh, see we went up there and uh, he got as high as 150. What was it 151? 151 94 it's now trading four dollars lower at 47 79 Remember you heard it here on a lucky call. I finally got it right tommy after 12 years, baby We're smoking baby. We can do it you and me. All right. Let's move on to the next one here I'm not on drugs folks. I'm just very very happy today. Hold on just a second move up I'm always happy every day. Let's move up to the next one. We want to cover is the Shucks, where is it got it? Finally got one right after all these years boy. That's just a that just makes me feel just happier that uh Oh shucks.  Here it is This one this was in big trouble folks. Here's bitcoin People have asked about this There you go, uh, we're down here. We're a little below the 786 this morning folks So anything below 8,000 and this makes it to very very suspect from the bully side That's uh, that's what it looks like anyway, and I believe we are we are below that here it is this morning Let me get this updated. That was yesterday's we'll get this one up here today and uh Okay, mr. Z is asking a question about tell Us the year your fans wrote the pesavento pattern. That was 1995 1995 1995 is when they did it over a weekend when I was up there at Salt Lake City giving a lecture They just wrote it for me. I spent a hundred grand trying to get that thing done Then two of my students that were that started that mt4 stuff Two russian programmers did it also, but the irvingtons did it for me It helps to look at the patterns quickly, you know, that's really what you're looking at So remember i've got a fundamentalist folks. That's the understatement of the year Hey, we're coming to the end of the line tomorrow. Don't miss the show. We're gonna have tom on hopefully david paul also So live every day in an attitude of gratitude and may god bless


My name's Ray Gasser. We've been farming here in southwest Iowa since 1978. Our history here has been, you know, we've been no-tilling almost everything for the last 30 years. And we think it's really important to maintain the soil, you know, to build up organic matter. And we've been really, I think, successful at controlling erosion and building that organic matter on our soils for almost 30 years. But in the last several years, you know, we've had such severe rain events and, you know, three or four inches in an hour or eight to ten inches of rain overnight. And our conservation practices, our no-till, our waterways, our terraces, just aren't enough to handle those kind of events. Our goal is to have a cover crop on every acre, you know, that might be five years down the road because it's just a learning process for us now. You know, it's going to take more time in the fall to get the cover crop seeded. It's going to take more management in the spring to get the cover crops terminated at the proper time. We've formed about 6,000 acres total, about 1,200 this year's cover crops. We started three years ago with 200 acres of cover crops. Last year we did about 1,000 acres and this year we're 1,200. We're trying to learn as we go to see what works best. So in this particular field is cereal rye and it was planted 10 days ago. So in one week it was already up and growing and that's the advantage that we see in our climate here in Iowa because we have a limited amount of growth between harvest and the time we freeze up. We need something that's pretty aggressive, we think. The main benefit, the main concern for us today is conservation and erosion control but we see the ability to maybe build up on our soil health and those are the advantages that we see down the road as we do continuous cover crops every year. We think we will build the soil health and make our yields of our soybeans and corns even better down the road. I believe that I think it's something that is really going to grow because they do believe that we will find there's lots of benefits to cover crops in addition to erosion control, nutrients, sequestration, the soil health things. We do care about the land here on our farm and we're concerned about it and we want to do the best job that we can to maintain the health of the soil, to maintain the soil that's in place. All those I think will find lots of benefits.